Run body(item) per element on first sight (storing its cleanup) and run that cleanup when the element leaves. Identity is element reference — keep stable refs across mutations, don't re-create objects every frame.
body(item)
Run
body(item)per element on first sight (storing its cleanup) and run that cleanup when the element leaves. Identity is element reference — keep stable refs across mutations, don't re-create objects every frame.