Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18] Updated Suspense doc with behavior during SSR and Hydration #4484

Merged
merged 8 commits into from
Mar 28, 2022
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions content/docs/reference-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ It is documented in our [code splitting guide](/docs/code-splitting.html#reactla

While this is not supported today, in the future we plan to let `Suspense` handle more scenarios such as data fetching. You can read about this in [our roadmap](/blog/2018/11/27/react-16-roadmap.html).

#### `React.Suspense` in SSR
During SSR trees wrapped in Suspense are rendered synchronously as deeply as possible. If the boundary never suspends
then the tree renders as though the boundary were never there. If a component does suspend then we schedule a low
priority task to render the fallback instead. If the component unsuspends before we flush the fallback then we send
down the actual content and throw away the fallback.

#### `React.Suspense` during hydration
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
salazarm marked this conversation as resolved.
Show resolved Hide resolved
a higher priority than neighboring boundaries. [Read more](https://github.com/reactwg/react-18/discussions/130)

### `React.startTransition` {#starttransition}

```js
Expand Down