Question · JavaScript and React course · Module 9: Modern React Hooks
Dynamic Import in React
What is the main purpose of using React.lazy() with dynamic import()?
Answer options
- Speeding up TypeScript compilation
- Splitting code into smaller fragments loaded on demand (code splitting)
- Automatically caching components in browser memory
- Enabling CSS file imports in components
You can check the correct answer by solving this task in the CodeWorlds game.