Skip to content

Commit

Permalink
added spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
its-the-shrimp committed Sep 23, 2023
1 parent 484c2fb commit 0de5e3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/docs/concepts/suspense.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ The latter is the one responsible for signaling when to re-render the suspended
2. Dropping the handle.

:::danger

The suspension handle must be stored until it's time to update components, i.e. with newly received data;
otherwise, the suspended components will enter an infinite re-render loop, thus hampering performance.
In the example above, the suspension handle is preserved by being moved into a closure and passed into `on_load_user_complete`.
When the hypothetical user will be loaded, the closure will be called, thus calling `handle.resume()` and re-rendering the components associated with the suspension context.

:::

# Complete Example
Expand Down

0 comments on commit 0de5e3a

Please sign in to comment.