What is SUSPENSE on the server in React 18

2 years ago
9

New React 18 Feature - All you need to know to start using it.

Hi everyone!
In this short video, I explain what SUSPENSE on the server is. A new feature that is available thanks to the concurrent rendered. Check this video to learn about what Concurrent Rendering is: LINK
Suspense is a component that allows us to Split the code and show a temporary fallback component from the client until the slow component code is loaded. So we can break the App apart into different blocks and allows them to render asynchronously when they are ready. Then the server will render and show its HTML in the same streaming.
This solves the issue of a slow component holding up the process. And improves the user experience by allowing the user to gradually consume the revealed content.

Don't forget to subscribe to my channel to be up to date with everything that is going on with React.

Loading comments...