F+Foldkit Plus
HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Mirror

Guides

foldkit-mirror

  • Overview
  • Plug the URL into makeApplication with Mirror.routing
  • Add remembered local state with Mirror.kv
  • Keep what a server renders in a cookie with Mirror.cookie
  • Restore before the first render with bootstrap
  • One list per application with wiring
  • Defaults, codecs, and batching
  • URL history behavior
  • Key-value restore semantics
  • Writing and persistence behavior
  • The generic store seam

Mirrored state

  • Overview
  • How a mirror works without creating a second store
  • Why keeping the Model authoritative prevents drift
  • How values load back at startup
  • Where each kind of state belongs

API

  • foldkit-mirror

Open source, MIT
Foldkit 0.170 · Effect 4

Mirror / foldkit-mirror

MirrorMessage

type · packages/mirror/src/index.ts:405

type MirrorMessage = MirrorRestored
Previousfoldkit-mirror

Edit on GitHub ↗

This site is a Foldkit Plus application, rendered at build time with foldkit-ssr. Its source

FoldkitEffectGitHub

Menu

HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Mirror

Guides

foldkit-mirror
  • Overview
  • Plug the URL into makeApplication with Mirror.routing
  • Add remembered local state with Mirror.kv
  • Keep what a server renders in a cookie with Mirror.cookie
  • Restore before the first render with bootstrap
  • One list per application with wiring
  • Defaults, codecs, and batching
  • URL history behavior
  • Key-value restore semantics
  • Writing and persistence behavior
  • The generic store seam
Mirrored state
  • Overview
  • How a mirror works without creating a second store
  • Why keeping the Model authoritative prevents drift
  • How values load back at startup
  • Where each kind of state belongs

API

  • foldkit-mirror

Open source, MIT
Foldkit 0.170 · Effect 4