Open
Description
Summary 💡
Check each use case with React 18 in mind. Our docs are probably a good start.
Examples 🌈
<NoSsr fallback="loading">
<Suspense fallback="loading">
<SomeLazyComponent />
</Suspense>
</NoSsr>
can be written without NoSsr
alltogether.
Motivation 🔦
NoSsr
only renders its children when an effect ran. This leads to cascading updates which is especially problematic for the default case where defer={false}
and we use layout effects.
The reason we have NoSsr
is to not render components that don't do anything before hydration. In React 18 we now have access to Suspense which enables streaming rendering and selective hydration which should cover most use cases while also improving existing scenarios (e.g. prioritizing hydration).
Search keywords: