React.lazy API in 60 seconds (Code-Splitting with Suspense)

twitter logo github logo ・1 min read

twitter logo DISCUSS (13)
markdown guide

Straight to the point, no boring bla-bla.


Can this be used for static sites such as Gatsby? Because I just tried with Gatsby and I'm getting build errors.


I'm not sure

If you're performing server side rendering with Gatsby, then this wouldn't work (SSR isn't supported yet)

If not, make sure you're on the latest React version


I don't have SSR. Yes. I do have the react latest.
Can't seems to be working. anyway Thanks for the clear introduction :)


You lied! It was 56 second video 😉

That was a great intro to code-splitting with suspense.


Thank you for keeping it to the point, most tutorials you need to skip ahead ten minutes in to understand.


It's great! We need more 1-minute educational resources!


Awesome! But how is this different from Loadable library? Am I missing anything?


Compared to loadable

Pro: Comes built-in, nicer API
Con: No SSR support yet.

Classic DEV Post from Jun 1

Demystifying Open Source Contributions

Sid profile image
Independent developer. Built,,, bundlesize past: design systems @auth0, frontend architect @practo 📧 🎥