Liking cljdoc? Tell your friends :D

frame.std-interceptors


ctx-handler->interceptorclj/s

(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]))
raw docstring

fx-handler->interceptorclj/s

(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:

  1. extracts :coeffects
  2. call handler-fn giving coeffects
  3. stores the result back into the :effects
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:
   1. extracts `:coeffects`
   2. call handler-fn giving coeffects
   3. stores the result back into the `:effects`
raw docstring

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

× close