Continuity Contract
If a framework replaces subtrees directly, it must answer a practical question:
Which interaction state should survive replacement?
Ansiq’s answer is the continuity contract.
What it preserves today
The current continuity contract preserves:
- focus
- input cursor
- list selection
- table selection
- tabs selection
- scroll positions
This is not optional polish. It is part of making subtree replacement viable.
What continuity keys are for
When structure changes but a node should still be treated as the same logical thing, use a continuity key.
That gives the runtime a stable identity anchor across rerender and replacement.
Why position is not enough
Position-only matching breaks down when:
- siblings reorder
- items are inserted
- conditional branches switch
At that point, “the second child” is no longer the same interactive object.
Where to go next
Continue with:
Last updated on