Put in order · JavaScript and React course · Module 6: React Router

Lazy loading process in React

Arrange the steps of lazy loading a component in React:

Items to put in order

  • The user navigates to the route with the lazy component
  • The component is rendered after loading
  • React dynamically fetches the chunk with the component
  • Define the component using React.lazy()
  • Wrap the lazy component in Suspense with a fallback

You can check the correct answer by solving this task in the CodeWorlds game.