React.lazyand Suspense is not yet available for server-side rendering. If you want to do code-splitting in a server rendered app, we still recommend React Loadable. It has a nice guide for bundle splitting with server-side rendering.
React.lazythe function lets you render a dynamic import as a regular component.
OtherComponentwhen this component gets rendered.
React.lazytakes a function that must call a dynamic
import(). This must return a
Promisewhich resolves to a module with a
defaultexport containing a React component.