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/binding-this-each-block-pro.../main.svelte

12 lines
198 B

<script>
export let visible = false;
export let items = [{ value: 'a', ref: null }];
</script>
{#if visible}
{#each items as item}
<div bind:this={item.ref}>{item.value}</div>
{/each}
{/if}