diff --git a/sites/svelte-5-preview/src/routes/docs/content/01-api/05-imports.md b/sites/svelte-5-preview/src/routes/docs/content/01-api/05-imports.md index d364f82429..a42cde2319 100644 --- a/sites/svelte-5-preview/src/routes/docs/content/01-api/05-imports.md +++ b/sites/svelte-5-preview/src/routes/docs/content/01-api/05-imports.md @@ -44,6 +44,8 @@ const app = mount(App, { }); ``` +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()`. + ### `hydrate` 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, { }); ``` +As with `mount`, effects will not run during `hydrate` — use `flushSync()` immediately afterwards if you need them to. + ### `unmount` Unmounts a component created with [`mount`](#svelte-mount) or [`hydrate`](#svelte-hydrate):