Too Long; Didn't Read
Large bundle sizes and slow startup is a common problem faced by single-page applications. The goal is to keep individual chunks under 100–150 KB, so that the application becomes interactive within 4–5 seconds. The open source library react-loadable provides a React-friendly API for code splitting. The modules and its dependencies are no longer a part of the main JavaScript bundle and are loaded asynchronously when rendered for the first time. If you're using create-react-app, Webpack automatically takes care of splitting the bundle and loading chunks on demand.
Share Your Thoughts