Skip to content

Commit 931e2fc

Browse files
salazarmeps1lon
andauthored
[18] Updated Suspense doc with behavior during SSR and Hydration (#4484)
* update wording * wording * update events * Update content/docs/reference-react.md Co-authored-by: Sebastian Silbermann <[email protected]> * add link to selective hydration * remove some of the implementation details Co-authored-by: Sebastian Silbermann <[email protected]>
1 parent a9ea7fc commit 931e2fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/docs/reference-react.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,14 @@ It is documented in our [code splitting guide](/docs/code-splitting.html#reactla
370370
>
371371
> For content that is already shown to the user, switching back to a loading indicator can be disorienting. It is sometimes better to show the "old" UI while the new UI is being prepared. To do this, you can use the new transition APIs [`startTransition`](#starttransition) and [`useTransition`](/docs/hooks-reference.html#usetransition) to mark updates as transitions and avoid unexpected fallbacks.
372372

373+
#### `React.Suspense` in Server Side Rendering
374+
During server side rendering Suspense Boundaries allow you to flush your application in smaller chunks by suspending.
375+
When a component suspends we schedule a low priority task to render the closest Suspense boundary's fallback. If the component unsuspends before we flush the fallback then we send down the actual content and throw away the fallback.
376+
377+
#### `React.Suspense` during hydration
378+
Suspense boundaries depend on their parent boundaries being hydrated before they can hydrate, but they can hydrate independently from sibling boundaries. Events on a boundary before its hydrated will cause the boundary to hydrate at
379+
a higher priority than neighboring boundaries. [Read more](https://github.com/reactwg/react-18/discussions/130)
380+
373381
### `React.startTransition` {#starttransition}
374382
375383
```js

0 commit comments

Comments
 (0)