Effective Code Splitting in React: A Practical Guideby@aakashns
32,593 reads

Effective Code Splitting in React: A Practical Guide

April 9th 2020
5m
by @aakashns 32,593 reads
tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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.

Company Mentioned

Mention Thumbnail
featured image - Effective Code Splitting in React: A Practical Guide
Aakash N S HackerNoon profile picture

@aakashns

Aakash N S

Receive Stories from @aakashns

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!