Skip to content

Commit 32ad528

Browse files
committed
docs
1 parent 0b7d67c commit 32ad528

File tree

1 file changed

+4
-0
lines changed
  • sites/svelte-5-preview/src/routes/docs/content/01-api

1 file changed

+4
-0
lines changed

sites/svelte-5-preview/src/routes/docs/content/01-api/05-imports.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ const app = mount(App, {
4444
});
4545
```
4646

47+
Note that unlike calling `new App(...)` in Svelte 4, things like effects (including `onMount` callbacks, and action functions) will not run during `mount`. If you need to force pending effects to run (in the context of a test, for example) you can do so with `flushSync()`.
48+
4749
### `hydrate`
4850

4951
Like `mount`, but will reuse up any HTML rendered by Svelte's SSR output (from the [`render`](#svelte-server-render) function) inside the target and make it interactive:
@@ -59,6 +61,8 @@ const app = hydrate(App, {
5961
});
6062
```
6163

64+
As with `mount`, effects will not run during `hydrate` — use `flushSync()` immediately afterwards if you need them to.
65+
6266
### `unmount`
6367

6468
Unmounts a component created with [`mount`](#svelte-mount) or [`hydrate`](#svelte-hydrate):

0 commit comments

Comments
 (0)