(ctx-handler->interceptor handler-fn)Returns an interceptor which wraps the kind of event handler given to reg-event-ctx.
These advanced handlers take one argument: context and they return a modified context.
Example:
(fn [context]
(enqueue context [more interceptors]))
Returns an interceptor which wraps the kind of event handler given to `reg-event-ctx`.
These advanced handlers take one argument: `context` and they return a modified `context`.
Example:
(fn [context]
(enqueue context [more interceptors]))(fx-handler->interceptor handler-fn)Returns an interceptor which wraps the kind of event handler given to reg-event-fx.
These handlers take two arguments; coeffects and event, and they return effects.
(fn [coeffects event]
{:db ...
:dispatch ...})
Wrap handler in an interceptor so it can be added to (the RHS) of a chain:
:coeffects:effectsReturns an interceptor which wraps the kind of event handler given to `reg-event-fx`.
These handlers take two arguments; `coeffects` and `event`, and they return `effects`.
(fn [coeffects event]
{:db ...
:dispatch ...})
Wrap handler in an interceptor so it can be added to (the RHS) of a chain:
1. extracts `:coeffects`
2. call handler-fn giving coeffects
3. stores the result back into the `:effects`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 |