What is Suspense, and how does it relate to concurrent rendering?

React performance · Experienced

Model answer

Suspense lets a component wait for something (lazy code, or data from a Suspense-enabled library or framework) and shows a fallback until it is ready. Concurrent rendering lets React prepare updates in the background and interrupt them if something more urgent happens, which keeps the UI responsive.

Together with transitions, you can keep the old screen visible instead of flashing a loading state.

Learn this topic

React Performance: memo, useMemo, useCallback and When Not to Use Them in the course React.js Full Course: Beginner to Advanced.

Sign in to add your own answer.

More questions