Lesson 4.1

Code splitting that pays off

Splitting only helps if the split-off code was genuinely not needed for the first screen. Analyse the bundle before you cut it.

Duration
6m
Level
Advanced
Students
4k students

Overview

Splitting only helps if the split-off code was genuinely not needed for the first screen. Analyse the bundle before you cut it.

In this lesson you will:

  • Read a bundle analysis and find the heavy dependency
  • Split along route and interaction boundaries
  • Avoid splitting code that is needed immediately anyway

Resources

React documentation

The official reference for the tools used in this lesson.