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/each-block-keyed-recursive/main.svelte

13 lines
166 B

<script>
export let tree;
</script>
{#each tree as item, i (item.id)}
<div>
{item.id}
{#if item.sub}
<svelte:self tree={item.sub}/>
{/if}
</div>
{/each}