@housecor I think default only works with undefined values. If the backend explicitly sends null the value won’t be transformed into the default and will persist as null.
Scared of using an un-typed fetch function?
This gives you end-to-end type safety (with Zod) in less than 100 lines of code.
🔍 Autocomplete of Routes & input
🤏 No Zod in client-side bundle
Obviously missing a ton of features, but it's better than nothing.
4 ways to handle multiple promises in #JavaScript
How I choose:
1. Promise.all - I want all, but reject if any reject.
2. Promise.allSettled - I want the status of all, even if some reject.
3. Promise.race - I want the first.
4. Promise.any - I want the first that resolves.
Bytes is a work of art. There's no better way to stay up to date on the JavaScript ecosystem. Consistently the best newsletter I receive. The memes are dank too. https://t.co/YfOSpoVySi
I'm attending React Advanced Conference! Register for free and join me there with 10k other React engineers and 60+ great speakers! https://t.co/RsutlFIGU5 #ReactAdvanced#ReactJS#JavaScript
Hey! My Frontend Platform team at @stitchfix is hiring a Principal engineer! If you:
🔷 Like React, TypeScript & Next.js
🔷 Wanna work on a robust design system
🔷 Interested in DivOps
🔷 Enjoy improving the experience for other devs
DM me or apply at: https://t.co/iEUQye7Mge
🧵 The Ultimate TypeScript Thread 🧵
Here's everything I've learned from leading TS dev teams and working on XState's core team.
My goal is to turn you into a TypeScript wizard.
And yes, this thread is EVERGREEN - I'll add at least 3 more tips a week 🚀
Let's get started.