Optimize Nested Zones (Experimental)
masterWhen using deeply nested zones, you can optimize performance by helping the library identify placeholder (shadow) items. Use the SHADOW_ITEM_MARKER_PROPERTY_NAME property on your items and pass it to a data-is-dnd-shadow-item-hint attribute.
Note: When using this hint, you must include it in the key provided to your {#each} block to ensure the key remains unique when a shadow item is present.
<script>
import {dndzone, SHADOW_ITEM_MARKER_PROPERTY_NAME} from 'svelte-dnd-action';
let items = [];
</script>
<section>
<div use:dndzone={{items}} on:consider={e => items = e.detail.items} on:finalize={e => items = e.detail.items}>
{#each items as item (item.id)}
<div data-is-dnd-shadow-item-hint={item[SHADOW_ITEM_MARKER_PROPERTY_NAME]}>
<h1>{item.title}</h1>
</div>
{/each}
</div>
</section>