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, other than that
:db
is guaranteed to be executed first.
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, other than that `:db` is guaranteed to be executed first.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close