Mirror / Mirrored state
Mirrored state: keep URL, storage, and cookies in step with your Model
A list filter or search query belongs in the URL so people can share a link. A half-written draft or collapsed sidebar belongs in browser storage so it survives a reload. A cart or theme preference belongs in a cookie so a server can read it on the first request. Keeping any of these stores by hand quickly turns into a second source of truth: the address bar disagrees with your Model, every parameter duplicates parsing and defaults, and browser back/forward navigation triggers write-after-read loops.
foldkit-mirror solves this by keeping your Model as the only truth and deriving the external store from it. You declare which Model fields belong to a URL mirror (Mirror.url), a key-value mirror (Mirror.kv), or a cookie mirror (Mirror.cookie); the mirror writes only when those fields change and folds navigation or cold-load values back into your Model through update.