JoyDomStore

Compose's view of a JoyStore: the resolved spec, the current state and the session log are snapshot state, so committing an interaction recomposes whatever reads them.

The store owns the state; composition only reads it. Hold one with rememberJoyDomStore when the host needs the state, the log or rewind; otherwise let the store-backed JoyDom overload create one internally.

Properties

Link copied to clipboard
var log: List<<Error class: unknown class>>

The session log — initialState plus these interactions reproduces state.

Link copied to clipboard
var spec: <Error class: unknown class>

The resolved document for the current state, decoded for the renderer.

Link copied to clipboard
var state: <Error class: unknown class>

The authoritative state. Only a dispatched interaction or rewind changes it.

Functions

Link copied to clipboard

Dispatches a renderer event binding.

fun dispatch(binding: <Error class: unknown class>, payload: <Error class: unknown class> = JsonNull)

Feeds a fired binding into the loop. Serial, and never throws — it runs in gesture callbacks.

Link copied to clipboard
fun rewind(entries: Int)

Truncates the log to its first entries interactions and re-folds — undo and time-travel.