liveBook · Manning

Code splitting

Code splitting divides application code into separately loadable bundles or chunks, allowing portions to be delivered independently.

How 4 Manning books explain it

Fast by Default

A software delivery technique that divides program code into separately loadable chunks so that only necessary code is initially delivered.

How it is used
Reduces initial JavaScript delivery by loading feature and route code only when users need it.
How deep it goes
Explains bundle allocation through startup and feature examples, then ties decisions to compressed-byte and request-count budgets.
Examples
Uses on-demand routes and translations, article comments, social-media features, and a compose-only emoji picker.
What you can do after
Apply it through bundle budgets and conditional loading decisions for routes, libraries, and feature-specific code.

Read how Fast by Default explains code splitting →

Acing the Frontend Interview

Code splitting divides an application’s deployable code into separately loadable bundles or chunks.

How it is used
Optimizes large React applications by deferring route and feature code until users need it.
How deep it goes
Connects dynamic imports to React.lazy, Suspense, route segmentation, and scalable team ownership without detailing bundler internals.
Examples
Demonstrates checkout, profile, and product routes loaded through React.lazy and a shared Suspense fallback.
What you can do after
Apply it via dynamic import(), React.lazy, Suspense, and route-level feature boundaries.

Read how Acing the Frontend Interview explains code splitting →

React Hooks in Action: With Suspense and Concurrent Mode

Code splitting is a technique that divides an application's code into separately loadable bundles.

How it is used
Reduces initial browser loading by deferring infrequently used routes and components until user interaction requires them.
How deep it goes
Explains dynamic imports, lazy components, Suspense fallbacks, and route splitting; defers detailed error fallback handling.
Examples
Uses a bookings app with split page routes and nested Bookables view, edit, and new-form components.
What you can do after
Apply it via React.lazy, dynamic import, Suspense, and route boundaries to load UI progressively with fallback content.

Read how React Hooks in Action: With Suspense and Concurrent Mode explains code splitting →

Secrets of the JavaScript Ninja, Third Edition

A build technique that divides application code into separate output chunks, often so they can be loaded independently.

How it is used
Balances initial JavaScript downloads, page navigation, and cache reuse when building web applications.
How deep it goes
Explains chunking tradeoffs and preload options, but defers bundler-specific configuration.
Examples
Compares one bundle, per-page bundles, and shared-plus-page chunks across a ten-page site.
What you can do after
Apply code splitting through bundler configuration and combine manual chunking with prefetching to tune the site experience.

Read how Secrets of the JavaScript Ninja, Third Edition explains code splitting →

Also covered in

What to know first

Related concepts

Questions about code splitting

What is code splitting?

Code splitting divides application code into separately loadable bundles or chunks, allowing portions to be delivered independently.

Which Manning books explain code splitting?

Fast by Default, Acing the Frontend Interview, React Hooks in Action: With Suspense and Concurrent Mode and Secrets of the JavaScript Ninja, Third Edition.

What should I know before learning code splitting?

Manning books that teach code splitting usually introduce bundling and caching first.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.