(clear-handlers!)
Unregister all event handlers
Unregister all event handlers
(comp-middleware v)
Given a vector of middleware, filter out any nils, and use "comp" to compose the elements. v can have nested vectors, and will be flattened before "comp" is applied. For convienience, if v is a function (assumed to be middleware already), just return it. Filtering out nils allows us to create Middleware conditionally like this: (comp-middleware [pure (when debug? debug)]) ;; that 'when' might leave a nil
Given a vector of middleware, filter out any nils, and use "comp" to compose the elements. v can have nested vectors, and will be flattened before "comp" is applied. For convienience, if v is a function (assumed to be middleware already), just return it. Filtering out nils allows us to create Middleware conditionally like this: (comp-middleware [pure (when debug? debug)]) ;; that 'when' might leave a nil
(handle event-v)
Given an event vector, look up the handler, then call it. By default, handlers are not assumed to be pure. They are called with two paramters:
app-db
atomapp-db
- the return value is ignored.
To write a pure handler, use the "pure" middleware when registering the handler.Given an event vector, look up the handler, then call it. By default, handlers are not assumed to be pure. They are called with two paramters: - the `app-db` atom - the event vector The handler is assumed to side-effect on `app-db` - the return value is ignored. To write a pure handler, use the "pure" middleware when registering the handler.
(register-base event-id handler-fn)
(register-base event-id middleware handler-fn)
register a handler for an event. This is low level and it is expected that "re-frame.core/register-handler" would generally be used.
register a handler for an event. This is low level and it is expected that "re-frame.core/register-handler" would generally be used.
(report-middleware-factories v)
See https://github.com/Day8/re-frame/issues/65
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close