Tehseen Ahmed

MERN Stack Developer

Freelance

/ahmedtehseen

@TehseenSiddiq

Lazy Loading with Suspense

  1. Code Splitting using dynamic import()
  2. Lazily loaded components using React.lazy()
  3. Handle fallback using Suspense Component

Things we will be discussing

Code Splitting using dynamic import()

  1. What is code splitting?

  2. Code splitting using dynamic import?

Q: Why do we need code splitting?

A: Whenever we want to reduce the bundle size of our application.

Lazily loaded components using React.lazy()

  1. What is lazy loading?

  2. What is React.lazy?

The Suspense is Real!

Lazy Loading with Suspense

By Tehseen Ahmed

Lazy Loading with Suspense

Lazy loading using React.lazy and Suspense

  • 241