Below is a really simple Svelte component.
When you click the button, it updates pages[2].name. How does Svelte handle this? Does it re-evaluate all 3 DIVs? Or does it know to just modify the 3rd DIV's data because the assignment is to pages[2].name?
<script>
let pages = [{name:'Adam'}, {name:'Barry'}, {name:'Charlie'}];
function updateName(){
pages[2].name = 'New Person';
}
</script>
{#each pages as page}
<div>{page.name}</div>
{/each}
<button on:click={updateName}>Update Name</button>