What is Code Splitting?
Large applications can contain many screens and features. Loading all JavaScript immediately can increase the initial download size.
Code splitting allows some application code to be loaded only when it is needed.
Lazy Loading
React provides lazy and Suspense for loading components asynchronously.
Good Candidates
- Large route-level pages.
- Administration screens.
- Rarely used features.
- Heavy editors or visualization components.
ADVERTISEMENT