Rendering model and components
Explain what a render is, when React renders and what it commits.
- RCT.01.01Render vs commit; React elementsCoreMid-level10 min
- RCT.01.02State as a snapshot and batchingCoreMid-level10 min
- RCT.01.03Purity, StrictMode and idempotent rendering + Class components and lifecycle (legacy)CoreMid-level12 min
Interview questions in this module
- What happens when you call
setState? Is it synchronous? - What is the difference between the render phase and the commit phase?
- What is automatic batching?
- Why does React StrictMode run effects twice in development?
- When does a component re-render?
- Why does
setCount(count + 1)three times only add one?