Liking cljdoc? Tell your friends :D

re-frame.fx


dbclj/s

(db value)
source

dispatchclj/s

(dispatch value)
source

dispatch-laterclj/s

(dispatch-later value)
source

dispatch-nclj/s

(dispatch-n value)
source

do-fxclj/s

An interceptor whose :after actions the contents of :effects. As a result, this interceptor is Domino 3.

This interceptor is silently added (by reg-event-db etc) to the front of interceptor chains for all events.

For each key in :effects (a map), it calls the registered effects handler (see reg-fx for registration of effect handlers).

So, if :effects was: {:dispatch [:hello 42] :db {...} :undo "set flag"}

it will call the registered effect handlers for each of the map's keys: :dispatch, :undo and :db. When calling each handler, provides the map value for that key - so in the example above the effect handler for :dispatch will be given one arg [:hello 42].

You cannot rely on the ordering in which effects are executed.

An interceptor whose `:after` actions the contents of `:effects`. As a result,
this interceptor is Domino 3.

This interceptor is silently added (by reg-event-db etc) to the front of
interceptor chains for all events.

For each key in `:effects` (a map), it calls the registered `effects handler`
(see `reg-fx` for registration of effect handlers).

So, if `:effects` was:
    {:dispatch  [:hello 42]
     :db        {...}
     :undo      "set flag"}

it will call the registered effect handlers for each of the map's keys:
`:dispatch`, `:undo` and `:db`. When calling each handler, provides the map
value for that key - so in the example above the effect handler for :dispatch
will be given one arg `[:hello 42]`.

You cannot rely on the ordering in which effects are executed.
sourceraw docstring

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

× close