Question · JavaScript and React course · Module 8: Advanced React Patterns

Code Splitting with React.lazy

What does React.lazy() do and when do we use it?

Answer options

  • Delays component rendering by a specified time
  • Caches the component's rendering result for a specified time
  • Loads a component dynamically (code splitting), reducing the initial bundle size
  • Automatically splits CSS into separate files per component

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