Some utility svelte stores
npm i -D @eslym/svelte-utility-stores
yarn add -D @eslym/svelte-utility-stores
<script>
import { array } from '@eslym/svelte-utility-stores';
const arr = array(['item 1', 'item 2']);
</script>
<!-- just use .push for the array -->
<button type="button" on:click={()=>$arr.push(`item ${$arr.length + 1}`)}>Add Item</button>
<ul>
{#each $arr as item}
<li>{item}</li>
{/each}
</ul>
More example on this Svelte REPL