Mirror / foldkit-mirror
Limits
- A mirror is last-write-wins. Two tabs writing one KV document do not converge;
use
foldkit-syncwhen ordering and convergence matter. - Arrays and objects use JSON in the URL by default; provide a codec for a more readable representation.
- Two different mirror kinds may observe the same Model field. That is not two owners; cold-load precedence follows the URL -> KV -> initial rule above.
- A URL mirror only touches the keys it owns. It composes with a Foldkit
router's
route.query(schema)when they use different keys. - A cookie is sent with every request to its path, and browsers keep about 4 KB of one: mirror a few small fields there, not a document.
- Mirror stores have no durable operation log, conflict resolution, or multi-device synchronization.
See also
- Mirrored state — the conceptual guide and package choice rules.
foldkit-sync— state that must survive offline and converge.foldkit-remote— a cache of facts owned by the server.examples/todo-app— a linkable filter and a remembered draft in a real application.