This automatization often leads developers to treat a framework and build tools as a black box. JavaScript-based frameworks like React made the process of developing web applications streamlined and efficient, for better or worse. In this article, we’re going to cover code-splitting best practices and showcase some examples using React, so we load the minimum JavaScript necessary to render a page and dynamically load sizeable non-critical bundles.
This problem is more apparent on unreliable and slow networks and lower-end devices. Projects built using JavaScript-based frameworks often ship large bundles of JavaScript that take time to download, parse and execute, blocking page render and user input in the process. In this article, Adrian Bece shares more about the benefits and caveats of code-splitting and how page performance and load times can be improved by dynamically loading expensive, non-critical JavaScript bundles.