When rendering our application on the server, we have to tell the client which bundles to download on the initial page load. Open the server's index.js file to implement this logic. Import the react-loadable dependencies at the top of the file, as follows:
import Loadable, { Capture } from 'react-loadable';import { getBundles } from 'react-loadable/webpack';
We import the Loadable module itself, but also the Capture module. The last one is rendered along with your server-rendered application to collect all modules or components that were rendered for the current route that the user is visiting. It allows us to include those bundles along with the initial HTML that our server returns. To let our back end know which ...