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/site/content/examples/immutable/ImmutableTodo.html

16 lines
284 B

<svelte:meta immutable/>
<script>
import { afterUpdate } from 'svelte';
import flash from './flash.js';
export let todo;
let span;
flash(() => span);
</script>
<!-- the text will flash red whenever
the `todo` object changes -->
<span bind:this={span}>{todo.text}</span>