React Performance Engineering
LESSON 3.3

Suspense for data loading

Learn key techniques and workflows in React Performance Engineering.

16m
advanced
4,353 students

Overview

Suspense moves loading state out of the component and into its boundary, so you stop threading isLoading through the tree.

In this lesson you will:

  • Place boundaries where a meaningful fallback exists
  • Avoid a single boundary that blocks the whole page
  • Combine Suspense with error boundaries for failures

Pro Tip

Put the boundary where a skeleton would make sense to a user, not wherever the fetch happens to live.

Resources