Bit #36
Heuristics for optimizing React’s performance:
- If you can solve the problem by altering component hierarchy or state, prioritize that!
- Memoization is a solid strategy only if the cost of checking pays for itself with the time you save rendering.
- Use Lazy/Suspense API to progressively load components.
- Use the Transition API (
useTransition
/useDeferredValue
) when you’re really in a pickle (e.g something is computationally expensive, but not running it is not a choice).