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

MirrorApp

interface · packages/mirror/src/index.ts:845

interface MirrorApp<AppModel> {
  readonly owner: object
  readonly initial?: AppModel | undefined
}

An application a mirror is declared over: its identity token, and its initial Model when it has one.

Members

MirrorApp.owner#

property · packages/mirror/src/index.ts:846

readonly owner: object

MirrorApp.initial#

property · packages/mirror/src/index.ts:847

readonly initial?: AppModel | undefined
Previousfoldkit-mirror

On this page

  • owner
  • initial

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