fix: reconcile held items before render, not one frame after

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ViTUkt4czrvZdxdWwxqRAQ
This commit is contained in:
Diego Imbert
2026-09-11 17:16:09 +02:00
co-authored by Claude Opus 5
parent 568b336908
commit 36f7832aba
+3 -1
View File
@@ -862,7 +862,9 @@ export function useItems<V>(
}
untrack(reconcile)
$effect(reconcile)
// Before the template renders: a spec that moved on must not render one more frame of the
// item it left, remounting that item's form for nothing.
$effect.pre(reconcile)
onDestroy(() => {
for (const acq of held.values()) acq.release()
held.clear()