Liking cljdoc? Tell your friends :D

mainej.re-stated


dispatchclj/s

(dispatch event-v)

Returns a clj-statecharts action that will dispatch a re-frame event vector event-v.

See dispatch-by for details about the params appended to the event vector.

Returns a clj-statecharts action that will dispatch a re-frame event vector
`event-v`.

See [[dispatch-by]] for details about the params appended to the event
vector.
sourceraw docstring

dispatch-byclj/s

(dispatch-by f)

Returns a clj-statecharts action that will dispatch to re-frame.

f, a function of state-map and state-event, should return the re-frame event vector to be dispatched.

The dispatched event vector will receive two additional params, again, the state-map and state-event. If the state-event was triggered by a transition that received any additional result data, that will be available in the :data key of the state-event.

Returns a clj-statecharts action that will dispatch to re-frame.

`f`, a function of `state-map` and `state-event`, should return the re-frame
event vector to be dispatched.

The dispatched event vector will receive two additional params, again, the
`state-map` and `state-event`. If the `state-event` was triggered by a
transition that received any additional result data, that will be available in
the `:data` key of the `state-event`.
sourceraw docstring

dispatch-inclj/s

(dispatch-in evt-path)

Returns a clj-statecharts action that will dispatch a re-frame event vector that is stored in the state-map at the evt-path.

See dispatch-by for details about the params appended to the event vector.

Returns a clj-statecharts action that will dispatch a re-frame event vector
that is stored in the `state-map` at the `evt-path`.

See [[dispatch-by]] for details about the params appended to the event
vector.
sourceraw docstring

initialize-afterclj/s

(initialize-after state-map-path fsm)
(initialize-after state-map-path fsm state-map)

Returns a re-frame interceptor that will initialize a state-map with the fsm and store it at the given state-map-path.

See initialize-in for details about the optional state-map.

Returns a re-frame interceptor that will initialize a state-map with the
`fsm` and store it at the given `state-map-path`.

See [[initialize-in]] for details about the optional `state-map`.
sourceraw docstring

initialize-inclj/s

(initialize-in db state-map-path fsm)
(initialize-in db state-map-path fsm state-map)

Initialize a state map using the given fsm, and store it in the db at state-map-path.

If provided, state-map is used as the initial value of the state map (in clj-statecharts terminology, this is also known as the state "context".) This allows the state map to hold any additional data it may need when being transitioned. See, for example, dispatch-in.

Initialize a state map using the given `fsm`, and store it in the `db` at
`state-map-path`.

If provided, `state-map` is used as the initial value of the state map (in
clj-statecharts terminology, this is also known as the state "context".)
This allows the state map to hold any additional data it may need when being
transitioned. See, for example, [[dispatch-in]].
sourceraw docstring

machineclj/s

(machine spec)
(machine spec {:keys [clock] :or {clock (clock/wall-clock)}})

Returns a clj-statecharts state machine described by the spec.

These machines' delayed events will only work if their states are created by initialize-in or ::state/initialize.

Returns a clj-statecharts state machine described by the spec.

These machines' delayed events will only work if their states are created by
[[initialize-in]] or `::state/initialize`.
sourceraw docstring

stateclj/s

Access the clj-statecharts state stored in a state map.

Access the clj-statecharts state stored in a state map.
sourceraw docstring

transition-afterclj/s

(transition-after state-map-path fsm state-event)

Returns a re-frame interceptor that will transition a state-map stored at the given state-map-path, using the fsm and state-event.

Returns a re-frame interceptor that will transition a state-map stored at the
given `state-map-path`, using the `fsm` and `state-event`.
sourceraw docstring

transition-inclj/s

(transition-in db state-map-path fsm state-event)

Transition a state map stored in the db at state-map-path, using the given fsm and state-event.

Transition a state map stored in the `db` at `state-map-path`, using the
given `fsm` and `state-event`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close