Thread Reader
Cory House

Cory House
@housecor

Sep 22, 2022
5 tweets
Twitter

React: The Good Parts™ Core API: 1. Function components 2. JSX 3. useState 4. useReducer 5. useRef 6. lazy 7. Suspense Ecosystem: 1. TypeScript 2. Vite/Next/Remix 3. React Router 4. React Query 5. react-error-boundary 6. clsx 7. testing-library #react

What I mean by “The Good Parts”: React’s API has grown. And the ecosystem is massive. So it's hard to choose. "The Good Parts" are React’s best features and most trusted ecosystem projects. The other stuff isn’t “bad”. But "The Good Parts” are often all I need.
Why didn't I list context? - It's often unnecessary with react-query (most state is remote) - Not designed for frequent updates - Many third party state libraries provide similar benefits and better performance (Zustand, Signal, Jotai, Valtio, Redux, and Legend to name a few).
Why did I only list 3 hooks? Because the other hooks are rarely necessary, and frequently overused. Using frameworks or third party state often eliminates the need for using most of React's advanced hooks. So, the hooks in "The Good Parts" are often all I need.
Why didn't I list various performance-related features? Because if I compose my components properly, and keep my state as local as possible, performance optimizations are typically unnecessary.
Cory House

Cory House

@housecor
I help developers grow. Sharing coding tips, daily. Teaching software development: https://t.co/D5emROQa4J Helping teams transition to React: https://t.co/Qfp4Tfp3jf ⚛️
Follow on Twitter
Missing some tweets in this thread? Or failed to load images or videos? You can try to .