Skip to content

Commit

Permalink
docs: note hydration comments change
Browse files Browse the repository at this point in the history
closes #10375
  • Loading branch information
dummdidumm committed Jul 24, 2024
1 parent c18221d commit 39b4c71
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ Since these mismatches are extremely rare, Svelte 5 assumes that the values are
<img {src} />
```

### Hydration works differently

Svelte 5 makes use of comments during server side rendering which are used for more robust and efficient hydration on the client. As such, you shouldn't remove comments from your HTML output if you intend to hydrate it, and if you manually authored HTML to be hydrated by a Svelte component, you need to adjust that HTML to include said comments at the correct positions.

### `await` blocks delay render

In Svelte 4, an `{#await ...}` block immediately renders the pending section. In some cases, this is wasteful, because the promise is already resolved.
Expand Down

0 comments on commit 39b4c71

Please sign in to comment.