@EffectTS_ Beginners Complete Getting Started course is out now 🚀
From zero to building complete apps with effect
Type-safe, maintainable, testable apps, and it's just typescript 💯
Here is what you'll learn 👇🧵
Typescript wizardy: `as const` + `satisfies`
Combine both to have type safety on Record keys and values + constant inferred types
You can then extract both keys and values as unions using `keyof` and `typeof` 🧙
💡 Flutter tip 💡
Use Isolate to avoid blocking the UI 👀
Example: loading a 5Mb txt file as a List takes 17 seconds ⏱️
Without Isolate the UI will freeze during this time 🥶
Wrap with Isolate.run to be safe again 🦺
With macros + primary constructors @dart_lang becomes insane 🚀
Example: from a 50+ lines of code to just 1
Stay tuned, because this is going to be game-changing 🤯
Most underrated react hook: useSyncExternalStore
Subscribe to external store changes and extract values in sync with react rendering
Ideal for things like event listeners 💯
I implemented a sync engine for the web ⚡️
End to end, from reactive and fast client storage to server sync with web workers, socket, and CRDT
Article on how it all works coming soon 🔜
Important frontend rule: data should be parsed and formatted before reaching the UI
Formatting inside a component is problematic
👉 Formatting is computed at every render
👉 Hard to maintain coherent formatting
Validate the data at request time
Unpopular opinion: a react component should contain few to no business logic 👀
A component is only responsible for
1️⃣ Display content based on current state/context
2️⃣ Send events
Everything else should be defined outside
In @nextjs props and search parameters are Promises
But you don't need to create a separate client component to read them 💡
The `use` hook extracts Promise values, so pages can be client components 👇
Building production-ready typescript apps can be challenging 🫣
As your app becomes bigger, speed slows down, and your pain increases 🫠
@EffectTS_ is here to help, this is how 👇🎥