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

UrlMirrorConfig

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

interface UrlMirrorConfig<
  S extends Slice,
  Name extends string = string,
> extends MirrorConfig<S, Name> {
  readonly location?: UrlLocation | undefined
}

Members

UrlMirrorConfig.location#

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

readonly location?: UrlLocation | undefined

Where in the URL the keys live; default the query string.

Previousfoldkit-mirror

On this page

  • location

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