React · Junior · Question 35 of 75
What is React.lazy used for?
- ✓Correct answer: For lazy-loading a component's code as a separate chunk
- 2For deferring a component's render until it enters the viewport
- 3For deferring state updates
Explanation
const Admin = lazy(() => import('./Admin')) moves the component into a separate JS chunk loaded on first render. This shrinks the initial bundle. Showing content as you scroll is a different task (Intersection Observer).