We’ll use the immutable option as an example. In this app, the <Todo> component flashes whenever it receives new data. Clicking on one of the items toggles its done state by creating an updated todos array. This causes the other items to flash, even though they don’t end up making any changes to the DOM.

    Add this to the top of the Todo.svelte file:

    Now, when you toggle todos by clicking on them, only the updated component flashes.

    • — you never use mutable data, so the compiler can do simple referential equality checks to determine if values have changed
    • accessors={true} — adds getters and setters for the component’s props
    • namespace="..." — the namespace where this component will be used, most commonly

    Consult the for more information on these options.