← React Intermediate Questions - Set 5 Q48

How do you implement dynamic imports in React?

React Intermediate Questions - Set 5

Example

const mod = await import('./heavy');   // inside a handler or effect
const Chart = lazy(() => import('./Chart'));

What to notice

← Back to the question list