I write about React patterns I learned the hard way at work. Composition over configuration. Zero useless useEffects. The compiler doing the work for you. Currently shipping React 19 at AirportLabs. Wrote a book about all of it.
I use these 3 libraries in every project:
→ TanStack Query — server state, zero useEffect mess
→ React Hook Form — forms without re-render pain
→ Zod — catches what TypeScript can’t at runtime
#ReactJs#WebDev
The single sneakiest React bug I've shipped to production:
`{products.length && <List />}` rendered the literal number `0` on the page when the list was empty.
Always cast to boolean. Or just use a ternary.
Adding "one more prop" to your Modal/Card/Drawer is a smell.
If you're at 7+ props and most of them are `withHeader`, `withFooter`, `headerActions`, etc. - your component is begging to be refactored into composition.
Stop configuring. Start composing.
This is the Donut pattern.
The parent owns the structure.
The consumer fills the holes.
Zero `withHeader` / `withFooter` props. Zero conditionals. Infinite flexibility.
Once it clicks, you'll never write another 12-prop component.
Most React devs don't know this:
When you pass a new `key` to a component, React unmounts and remounts it — resetting all internal state for free.
No useEffect. No setState. No flicker.
I use this trick at least once a week.
The year started 4 months ago and since then I wrote and published a book, I released https://t.co/xnpg3MfqxJ and I am now making my mobile game! Consistency and motivation is everything!
I wrote a whole chapter on this in my new book *React Best Practices 2026*.
It also covers composition, custom hooks, virtualization, the React Compiler, useTransition, useOptimistic, Activity, ViewTransition, RHF + Zod, and more.
→ https://t.co/YOqke58KZM
I deleted ~80% of the useEffects in our React codebase this year.
The app is faster, has fewer bugs, and is way easier to read.
Here's the one rule I now use to decide if useEffect should exist 👇
The TL;DR:
useEffect is for synchronization with external systems. Not for application logic.
Once you internalize this, 80% of the bad effects in your codebase disappear naturally.