Back to Plate

Durable anchor vs live handle

docs/research/concepts/durable-anchor-vs-live-handle.md

53.0.6666 B
Original Source

Durable anchor vs live handle

Definition

A durable anchor is the value you can keep, map through changes, and resolve later.

A live handle is the mutable runtime helper the engine uses while editing is in flight.

Why the split matters

Public APIs usually want durable anchors.

Runtime internals often want live handles.

Confusing those two is how public APIs leak mutable runtime machinery.

Strongest supporting evidence

  • ProseMirror SelectionBookmark
  • local Slate v2 Bookmark
  • local Slate v2 lower-level RangeRef

Practical use

This concept is the reason the Slate v2 plan prefers Bookmark publicly and pushes RangeRef downward.