How to Use React.lazy

React 16.6.0 introduced React.lazy, which allows you to code-split using the new Suspense API.

Siddharth Kshetrapal came out with a great video showing how this works in 60 seconds. I’d recommend watching it –– it’s really well-done.

I’ve built a Github clone based off of Siddharth’s example. Hopefully this will help people who prefer reading to watching videos, or who to be walked through it step…

Software engineer. Opinions are my own. ~ https://maecapozzi.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Services In Angular Dart From The Fairy Tale Of The Tour Of Heroes

Rx.js Operators, Part II

Javascript Object and Class

LGM Web Development Internship

React — fetch data from an API

JavaScript: Arrays (for absolute beginners)

Validate Stack Sequences ( Daily Leetcode )

Selenium Testing with Docker and Nightwatch.js

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mae Capozzi

Mae Capozzi

Software engineer. Opinions are my own. ~ https://maecapozzi.com

More from Medium

A React Christmas

JavaScript memory model demystified

Context vs. Composition in React

What Is A useState Hook?