get tests passing

proxied-state-each-blocks
Rich Harris 9 months ago committed by Dominic Gannaway
parent 5f8988ad73
commit 5ff4932373

@ -1,7 +1,5 @@
<script>
import { proxy } from 'svelte';
const array = proxy([1, 2, 3]);
const array = $state([1, 2, 3]);
const sum = $derived(array.reduce((a, b) => a + b, 0));
</script>

@ -1,7 +1,5 @@
<script>
import { proxy } from 'svelte';
const ping = proxy({});
const ping = $state({});
ping.pong = { ping, pang: 'hello!' };
</script>

@ -1,7 +1,5 @@
<script>
import { proxy } from 'svelte';
const object = proxy({
const object = $state({
foo: {
bar: {
baz: 1

@ -1,11 +1,9 @@
<script>
import { proxy } from 'svelte';
const inner = proxy({
const inner = $state({
count: 0
})
const object = proxy({
const object = $state({
outer: {
inner
}

@ -1,7 +1,5 @@
<script>
import { proxy } from 'svelte';
const object = proxy({ count: 0 });
const object = $state({ count: 0 });
</script>
<button onclick={() => object.count += 1}>
Loading…
Cancel
Save