An event against a component's state machine: its keyword, whether it is one of Datastar's own, and the transition it causes. Pure: the machine's actions are the component's, and tracing hooks are passed in by the caller.
An event against a component's state machine: its keyword, whether it is one of Datastar's own, and the transition it causes. Pure: the machine's actions are the component's, and tracing hooks are passed in by the caller.
(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.
(transition machine ctx event)(transition machine ctx [event-name params] opts)Runs [event-name params] through machine from ctx and returns the new
ctx with :from-state (the state it left, as keywords). An internal
Datastar event returns ctx unchanged. opts are passed to the state
machine (e.g. :trace-fn / :action-trace-fn), plus :state-key :state.
Runs [event-name params] through `machine` from `ctx` and returns the new ctx with `:from-state` (the state it left, as keywords). An internal Datastar event returns `ctx` unchanged. `opts` are passed to the state machine (e.g. `:trace-fn` / `:action-trace-fn`), plus `:state-key :state`.
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 |