You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/reactive-assignment-in-comp.../main.svelte

17 lines
245 B

<script>
import { writable } from 'svelte/store';
let eid = writable(1);
let foo;
let u;
let v;
let w;
[u, v, w] = [
{id: eid = writable(foo = 2), name: 'xxx'},
5,
writable(6)
];
</script>
<h1>{foo} {$eid} {u.name} {v} {$w}</h1>