Screens from the token pages that keep six product teams consistent. React keeps changing how it wants us to think about rendering, and each change removes a class of bugs if you adopt the new model fully instead of translating old habits.
A look at the tokens
Think of a component as a description of what the screen should look like for the current data. Effects synchronise that description with things outside React, such as timers, subscriptions, or the document title.
What we would change next time
Questions, corrections, and war stories are welcome in the comments. Several of our best follow-up posts started as a reader pointing out something we had missed.
- Derive values during render instead of storing them.
- Give every effect a cleanup function.
- Keep state as close to where it is used as possible.
- Put Suspense boundaries where users expect a loading state.
The part about naming things made me laugh, then made me go rename three functions.
Same experience here, the tooling is much better now.