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/spread-reuse-levels/Nested.svelte

21 lines
378 B

<script>
import { beforeUpdate } from 'svelte';
export let a, b, c;
let changed = {};
let previous = {};
beforeUpdate(() => {
changed.a = a !== previous.a;
changed.b = b !== previous.b;
changed.c = c !== previous.c;
previous.a = a;
previous.b = b;
previous.c = c;
});
</script>
<pre>{JSON.stringify({ a, b, c })}</pre>
<pre>{JSON.stringify(changed)}</pre>