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.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
I enjoy reading the biographies of wildly successful people.
I’ve found a number of commonalities in their stories.
Here are 7 common threads of world-class performers:
👇
1. They worked harder than almost anyone would be willing to work.
They put in outrageous hours - often for a decade or more. They were totally imbalanced. They sacrificed nearly everything else to achieve greatness in a narrow field.
2. They didn’t just work hard. They got lucky.
Bill Gates’ parents got him access to a terminal when hardly anyone in the world could do so.
Will Smith bumped into Quincy Jones in LA by chance. Quincy contacted Will months later and proposed “The Fresh Prince of Bel Air”.
Software development estimates are frequently *way* off.
Why? Because many aspects of software development are nearly impossible to estimate.
Here are 9 reasons software development estimates fail:
👇
1. “Done” is debatable.
Aspects of acceptable quality like performance, code quality, security, accessibility, reusability, readability, and usability are hard to specify and quantify. This leads to time-consuming arguments and negotiations over when code is truly done.
2. Merge conflict overhead is unpredictable.
The frequency and complexity of conflicts varies based on team size, code coupling, ticket size, branching strategy, tech, and merge frequency.
And yes, many of these use useEffect behind the scenes. But that’s the point - instead of calling useEffect directly, you should probably use a mature abstraction at this point.
Just learned a new monorepo pattern from @rwieruch: Incubate and hatch.
Goal: Compose a separate repo within a monorepo. This is useful when the repo will be developed initially in a monorepo (incubated), and handed to a separate team (hatched).
1/4👇
Here's the incubate and hatch approach:
1. Create a separate repo.
2. Close the new repo into your existing monorepo. (Called incubation). Ignore the repo via .gitignore. This allows rapid dev by referencing local versions of relevant monorepo dependencies.
2/4
3. When the project is ready to be handed to the separate team, the repository is "hatched". Since the project had a dedicated repo all along, this is easy. Relevant dependencies are set to the current published version. The new team can upgrade deps over time, as desired.
3/4