React · Junior · Question 35 of 75

What is React.lazy used for?

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).

Further reading

Problem with a question

React · Junior · question 35

Test yourself

Take the React · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz