Skip to content

Commit 9fe1a46

Browse files
committed
add tests
1 parent aa6a5e9 commit 9fe1a46

14 files changed

+5956
-291
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
2-
let count = $state(0);
2+
let count = $state(0);
33
</script>
44

5-
<button on:click={() => count++}>
6-
clicks: {count}
5+
<button on:click="{() => count++}">
6+
clicks: {count}
77
</button>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script>
2+
let foo = $state({});
3+
let bar = {};
4+
5+
foo.bar = bar;
6+
7+
console.log(foo.bar === bar); // false — `foo.bar` is a reactive proxy
8+
console.log($state.is(foo.bar, bar)); // true
9+
</script>

0 commit comments

Comments
 (0)