mattphillipsio Profile Banner
@mattphillips.io 🦋 Profile
@mattphillips.io 🦋

@mattphillipsio

Followers
357
Following
3K
Media
47
Statuses
834

Software engineer | Tech entrepreneur | Founder @newbeeper | @fbjest maintainer. I love teaching and helping on all things code / startup / product. DMs open

London, England
Joined January 2012
Don't wanna be here? Send us removal request.
@mattphillipsio
@mattphillips.io 🦋
4 years
Hey 👋 Twitter is the home of my content, so follow along for: 🧑‍💻 Web dev, functional programming & testing in #Typescript 🤩 Getting into / maintaining open source software 💸 Tech entrepreneurship 📢 Building in public 🧑‍🚀 Career advice Wanna chat? My DMs are always open 😊
0
0
8
@whatthebluck
Stephen Bluck
2 years
Is your Typescript project using strings everywhere? Probably. @mattphillipsio explains why this isn’t such a great idea and how you can make your app even more type safe. Typescript: from stringly typed to strongly typed. https://t.co/joUoYucktL
mattphillips.io
TypeScript is often referred to as being "strongly typed" when in reality most TypeScript codebases are actually "stringly typed". In this article we will take a closer look at the effects of...
0
2
10
@jdegoes
John A De Goes
2 years
Haskell proves you don't need null at a high-level. Rust proves you don't need null at a low-level. Why are you still using null, again??
54
24
291
@acemarke
Mark Erikson
2 years
An interesting and well-written post with some compliments and concerns about React Server Components (and some other gripes about React in general): https://t.co/NA7LsqaI2P
10
70
362
@kettanaito
Artem Zakharchenko
2 years
This is a little reason why I dislike Next's API choices. Because they always encapsulate back on "next". This is how I want to declare this function instead: function getIp(request) { let forwadedRef = request.headers.get('x-forwarded-ref') } A subtle difference, right?
@leerob
Lee Robinson
2 years
The `headers()` function allows you to read from the incoming request. For example, here we're pulling `x-forwarded-for` (or `x-real-ip`) in a function.
60
36
756
@mattphillipsio
@mattphillips.io 🦋
2 years
Now that @reactjs has gone full circle to server-rendered websites like the good old php days... how far away are we from the next cyclical trend of SPAs being the "correct" way to build websites for *insert reasons here* 🤷‍♂️
0
0
3
@kettanaito
Artem Zakharchenko
2 years
Looking forward to the day we as a community realized file system-based routing was a mistake. Once you glimpse over the initial appeal, you see there's a flaw on a flaw. - File names aren't a format dynamic enough to support the extremely dynamic nature of routes; - Concern
53
16
238
@mattphillipsio
@mattphillips.io 🦋
2 years
cc/ @thymikee @kadikraman @srestaino I know you all use RN extensively 🙏
1
0
1
@mattphillipsio
@mattphillips.io 🦋
2 years
Do I go RN-cli or use @expo? What’s the deal with styling? Take it Tailwind is a no no Anyone ported over @shadcn ui to RN yet? What are the best practices around project structure, storing app state, auth, making http requests? Any resources / guides that you recommend?
2
0
2
@mattphillipsio
@mattphillips.io 🦋
2 years
Hey friends 👋 do I know any @reactnative experts? I’m planning on building an app for fun / to learn RN, question is where do I begin? Any advice would be greatly appreciated! Some questions below 👇
1
0
4
@mattphillipsio
@mattphillips.io 🦋
2 years
Just use cookies with httpOnly, secure and same-site enabled 🍪 I’ve never understood the fascination of storing tokens in localStorage, especially JWTs they can be stored in a cookie too you know 🤫
@TkDodo
Dominik 🔮
2 years
If you need another reason to not store tokens in localstroage, read this thread:
1
1
15
@mattphillipsio
@mattphillips.io 🦋
2 years
Everyone sees the missing await / error handling which are trivial to solve. I see the lack of parsing the JSON into something trustworthy via Zod/io-ts. I see so many bugs caused by devs trusting a value provided by the network. Also TS any on .json() aids this problem!
@TkDodo
Dominik 🔮
2 years
Everyone sees the missing await, which is so trivial to spot and fix with TypeScript. I see the missing error handling which will never show up on type level, or in your tests until your users report it...
1
1
6
@mattphillipsio
@mattphillips.io 🦋
3 years
This reminds me of the classic: "There are only two hard things in Computer Science: cache invalidation and naming things." Surely @nextjs would be better off making the soft navigation caching opt-in rather than default? That said maybe I'm missing obvious 🤷‍♂️
0
0
0
@mattphillipsio
@mattphillips.io 🦋
3 years
Am curious why @nextjs has opted for soft navigation caching by default in the app router?? I've been playing around with it today and it seems to be a minefield to actually get dynamic content to refetch when navigating and there is a plethora of related issues.
1
0
1
@boujeepossum
Aaron Abrams
3 years
@jsjoeio i would always prefer dependency injection or some other design change to mocking. and probably testing the logic on a higher level (not sure if your example is a simplified version if the real thing)
1
1
7
@boujeepossum
Aaron Abrams
3 years
We don't talk about this enough...
@theo
Theo - t3.gg
3 years
13
38
425
@MichaelArnaldi
Michael Arnaldi
3 years
Tell me you don't know how to write testable code without telling me you don't know how to write testable code.
@theo
Theo - t3.gg
3 years
Been almost 2 years since I wrote a test and I've never been more productive
3
2
15
@devongovett
Devon Govett
3 years
Easy to forget, but the debate about signals is the same one we had about 2-way data binding vs unidirectional data flow 10 years ago. Signals are mutable state! They’re bindings with a new name. The simplicity of UI as a function of state is lost when updates flow unpredictably.
36
100
967
@mattphillipsio
@mattphillips.io 🦋
3 years
This is so cool!! I absolutely love Sandpack v1 but Sandpack v2 with Nodebox is just... 🤯 Amazing work by everyone at @codesandbox I can't wait to play with this properly 🎉
@codesandbox
CodeSandbox
3 years
Introducing Sandpack 2.0 and Nodebox, a Node.js runtime for any browser. 📱 Run Node.js in any browser, any device ✨ Vite, Next.js, Astro & more ⚡ Super fast, with a Rust-based transpiler Here’s why we believe this is HUGE 👇 https://t.co/dZQ5hzK0Am
1
0
8
@danilowoz
Danilo Woznica
3 years
With Sandpack 2.0 & Nodebox, we're taking a step forward in improving the development world for students, content creators, open-source maintainers, and more. 🔥 Powerful. Fast. Ready To Use. 🔥
@codesandbox
CodeSandbox
3 years
Introducing Sandpack 2.0 and Nodebox, a Node.js runtime for any browser. 📱 Run Node.js in any browser, any device ✨ Vite, Next.js, Astro & more ⚡ Super fast, with a Rust-based transpiler Here’s why we believe this is HUGE 👇 https://t.co/dZQ5hzK0Am
6
4
45
@mattphillipsio
@mattphillips.io 🦋
3 years
And here's the code to render the example 👆
0
0
0