Effects and Data Fetching
7 pages · ~5 min✓ Reviewed
Builds on Hooks. Next up: Rendering and Performance.
What useEffect Is and the Mental Model
1. What it is and when it runs
useEffect(setup, deps?)synchronizes a component with an external system- External = network, DOM API, timer, subscription
- Not a lifecycle hook
- Renderpure calc
- CommitDOM updated
- Paintbrowser shows
- Effectsetup runs