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/set-in-onstate-dedupes-renders/Widget.html

13 lines
225 B

<div>{{foo.x}}</div>
<script>
export default {
onstate({ current, changed }) {
if (changed.foo || changed.bar) {
if (current.foo.x !== current.bar.x) {
throw new Error('mismatch');
}
}
}
};
</script>