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-each-remo.../Child.svelte

22 lines
325 B

<script>
import InnerChild from './InnerChild.svelte';
export let id = 1;
export let count;
export let increment;
let list;
$: {
list = [];
for (let i = 0; i < count; ++i) {
list.push(i);
}
}
</script>
<div data-id={id}>
{#each list as item (item)}
<InnerChild val={item} {increment} />
{/each}
</div>