Question · JavaScript and React course · Module 6: React Router

React.lazy and Suspense

What does the React.lazy() function return in React?

Answer options

  • A component ready for immediate rendering
  • A Promise that resolves to a module with a default export of the component
  • A hook for managing loading state
  • A configuration object for React Router

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