Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@ function addNumber() {
```

> [!NOTE] Deep reactivity is implemented using [proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy), and mutations to the proxy do not affect the original object.
>
> **Example:**
> ```js
> let original = [1, 2, 3, 4];
> let numbers = $state(original);
> // Now you have TWO separate things:
> // 1. `numbers` - the reactive proxy (triggers UI updates)
> // 2. `original` - the non-reactive original array
>
> numbers.push(5); // ✅ UI updates! numbers is now [1,2,3,4,5]
> console.log(original); // ❌ Still [1,2,3,4] - unchanged!
> ```