contains re-frame supplied, standard interceptors
contains re-frame supplied, standard interceptors
(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]))
(db-handler->interceptor handler-fn)
Returns an interceptor which wraps the kind of event handler given to reg-event-db
.
These handlers take two arguments; db
and event
, and they return db
.
(fn [db event]
....)
So, the interceptor wraps the given handler:
:coeffects
keys: db and event:effects
Returns an interceptor which wraps the kind of event handler given to `reg-event-db`. These handlers take two arguments; `db` and `event`, and they return `db`. (fn [db event] ....) So, the interceptor wraps the given handler: 1. extracts two `:coeffects` keys: db and event 2. calls handler-fn 3. stores the db result back into context's `:effects`
(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 ...
:fx ...})
Wrap handler in an interceptor so it can be added to (the RHS) of a chain:
:coeffects
: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 ... :fx ...}) 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`
(inject-global-interceptors state)
An interceptor which adds registered global interceptors to the context's queue.
NOTE: :queue is a Clojure.lang.PersistentQueue and not a vector.
An interceptor which adds registered global interceptors to the context's queue. NOTE: :queue is a Clojure.lang.PersistentQueue and not a vector.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close