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.

5mAdvanced3,970 students
Video thumbnail for Code splitting that pays off

Sign in to watch this lesson

Browsing is free. Create an account to play videos and track your progress.

Overview

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

What this lesson covers

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

This lesson sits in Bundle and Load Performance, part of React Performance Engineering. It assumes what came before it and leads directly into the next lesson in the module.

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