<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>