From 69f6b58bd405fbff97f1dc6b99a794823c997512 Mon Sep 17 00:00:00 2001 From: brunnerh Date: Wed, 23 Oct 2024 16:50:43 +0200 Subject: [PATCH] docs: Reference `svelte/reactivity` from `$state`. (#13571) --- documentation/docs/02-runes/02-$state.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/docs/02-runes/02-$state.md b/documentation/docs/02-runes/02-$state.md index 5c942c0444..e8213d3cf4 100644 --- a/documentation/docs/02-runes/02-$state.md +++ b/documentation/docs/02-runes/02-$state.md @@ -20,6 +20,8 @@ Unlike other frameworks you may have encountered, there is no API for interactin If `$state` is used with an array or a simple object, the result is a deeply reactive _state proxy_. [Proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) allow Svelte to run code when you read or write properties, including via methods like `array.push(...)`, triggering granular updates. +> [!NOTE] Classes like `Set` and `Map` will not be proxied, but Svelte provides reactive implementations for various built-ins like these that can be imported from [`svelte/reactivity`](./svelte-reactivity). + State is proxified recursively until Svelte finds something other than an array or simple object. In a case like this... ```js