An event against a component's state machine: its keyword, whether it is one of Datastar's own, what the machine steps from, and the :from-state stamped on what it returns. Pure: running the machine is the controller's.
An event against a component's state machine: its keyword, whether it is one of Datastar's own, what the machine steps from, and the :from-state stamped on what it returns. Pure: running the machine is the controller's.
(event-keyword event-name)The machine's keyword for an event name: upper-cased (increment → :INCREMENT).
The machine's keyword for an event name: upper-cased (`increment` → `:INCREMENT`).
(internal-event? event-name)Datastar's own events (RENDERER., INSTALLHOOK.), sent by the client-side library: no transition.
Datastar's own events (RENDERER.*, INSTALLHOOK.*), sent by the client-side library: no transition.
(machine-input ctx [event-name params])What the state machine steps from for event [event-name params] from
ctx: the ctx with its state as keywords (signals send it as a string), and
the event with its upper-cased keyword.
What the state machine steps from for `event` [event-name params] from `ctx`: the ctx with its state as keywords (signals send it as a string), and the event with its upper-cased keyword.
(with-from-state ctx initial-ctx)ctx stamped with :from-state: the state initial-ctx (the ctx the event
started from) was in, as keywords.
`ctx` stamped with :from-state: the state `initial-ctx` (the ctx the event started from) was in, as keywords.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |