When you load an application, you don't want to load every component to the browser all at once. This can take forever to load, especially over a slow network.
With React.lazy
, you can now code split your components and only load them when they are needed. Once a component is loaded, it will stay loaded within the application.
In this lesson, you will:
Suspense
Suspense
that will render while the lazy loaded component is loading