Skip to content

Commit 5e23a70

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

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/svelte.dev/content/docs/svelte/02-runes/02-$state.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ To take a static snapshot of a deeply reactive `$state` proxy, use `$state.snaps
168168

169169
This is handy when you want to pass some state to an external library or API that doesn't expect a proxy, such as `structuredClone`.
170170

171+
If a value has a `toJSON` method, the snapshot will clone the value returned from `toJSON` instead of the original object.
172+
171173
## `$state.eager`
172174

173175
When state changes, it may not be reflected in the UI immediately if it is used by an `await` expression, because [updates are synchronized](await-expressions#Synchronized-updates).

0 commit comments

Comments
 (0)