👉 Define objects in your markup-structure!
💫 Driven by svelte stores for highly robust code
🔥 Custom valueStore
to handle (subscribable) error and warning messages
Get started with literal wizardry!🧙♂️
npm i -D svelte-object
/ pnpm add -D svelte-object
This could be your code See REPL
<h3> An array of pets </h3>
<Array name='pets' let:value>
{#each value as item, k}
<Object name={k}>
<Input name='name'>Pets name</Input>
<Input name='age' type='number'>Pets age</Input>
</Object>
<button on:click={() => value.removeByIndex(k)}> Remove {item.name} </button>
{/each}
<button on:click={() => value.push({})}> Add pet </button>
</Array>
Note
What are you waiting for? Get Started!