What features are enabled by Concurrent Mode?
When you enable Concurrent Mode, you unlock several powerful features in React:
-
Suspense for Data Fetching
- Lets you declaratively "wait" for asynchronous operations like data loading.
- React can pause rendering until the data is ready without freezing the whole app.
-
Transitions
- You can mark certain updates as non-urgent (e.g., switching tabs, filtering lists).
- React can prioritize keeping the UI responsive while doing those transitions in the background.
-
Selective Hydration (for server-side rendering)
- React can prioritize hydrating (activating) only the most important parts of a page first, like buttons or inputs the user interacts with.
-
Time Slicing
- React breaks work into small units and spreads it over multiple frames.
- This way, high-priority interactions can interrupt low-priority rendering.
-
Concurrent Rendering
- React can prepare multiple versions of the UI at the same time and decide which one to commit based on user actions.
Summary:
Concurrent Mode brings features that help apps load faster, stay responsive, and handle asynchronous operations more gracefully.