Skip to content

Commit 1d0848e

Browse files
Sync svelte docs (#1546)
sync svelte docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 5cbd9e4 commit 1d0848e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-warnings.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,27 @@ Reactive `$state(...)` proxies and the values they proxy have different identiti
312312
313313
To resolve this, ensure you're comparing values where both values were created with `$state(...)`, or neither were. Note that `$state.raw(...)` will _not_ create a state proxy.
314314
315+
### state_proxy_unmount
316+
317+
```
318+
Tried to unmount a state proxy, rather than a component
319+
```
320+
321+
`unmount` was called with a state proxy:
322+
323+
```js
324+
import { mount, unmount } from 'svelte';
325+
import Component from './Component.svelte';
326+
let target = document.body;
327+
// ---cut---
328+
let component = $state(mount(Component, { target }));
329+
330+
// later...
331+
unmount(component);
332+
```
333+
334+
Avoid using `$state` here. If `component` _does_ need to be reactive for some reason, use `$state.raw` instead.
335+
315336
### svelte_boundary_reset_noop
316337
317338
```

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-warnings.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,27 @@ Reactive `$state(...)` proxies and the values they proxy have different identiti
319319
320320
To resolve this, ensure you're comparing values where both values were created with `$state(...)`, or neither were. Note that `$state.raw(...)` will _not_ create a state proxy.
321321
322+
### state_proxy_unmount
323+
324+
```
325+
Tried to unmount a state proxy, rather than a component
326+
```
327+
328+
`unmount` was called with a state proxy:
329+
330+
```js
331+
import { mount, unmount } from 'svelte';
332+
import Component from './Component.svelte';
333+
let target = document.body;
334+
// ---cut---
335+
let component = $state(mount(Component, { target }));
336+
337+
// later...
338+
unmount(component);
339+
```
340+
341+
Avoid using `$state` here. If `component` _does_ need to be reactive for some reason, use `$state.raw` instead.
342+
322343
### svelte_boundary_reset_noop
323344
324345
```

0 commit comments

Comments
 (0)