No Named exports

In this lesson, we'll learn the alternative way for using named exports with React.lazy.

We'll cover the following

If you remember from the previous lesson, I mentioned that React.lazy expects the dynamic import statement to include a module with a default export being a React component.

A Slight Limitation

At the moment, React.lazy doesn’t support named exports. That’s not entirely a bad thing, as it keeps tree shaking working to ensure you don’t import unused modules.

Consider the following module:

Get hands-on with 1200+ tech skills courses.