mirror of https://github.com/sveltejs/svelte
parent
3b3ed77783
commit
11ac7101dd
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: allow $derived runes to be re-assigned locally
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
const a = $state(0);
|
const a = $state(0);
|
||||||
let b = $derived(a);
|
let [b] = $derived([a]);
|
||||||
b = 1;
|
b = 1;
|
||||||
</script>
|
</script>
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
const a = $state(0);
|
const a = $state(0);
|
||||||
let b = $derived(a);
|
let {b} = $derived({a});
|
||||||
b++;
|
b++;
|
||||||
</script>
|
</script>
|
Loading…
Reference in new issue