You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/component-binding-blowback-e/One.svelte

18 lines
267 B

<script>
import Two from './Two.svelte';
export let list;
export let i;
function handle_click() {
list = [...list, {}];
}
</script>
{#each list as item, j}
<Two bind:value={item.value} {i} {j}/>
{/each}
<button on:click={handle_click}>
click me
</button>