Liking cljdoc? Tell your friends :D

re-frame.core


->interceptorclj/s

source

add-post-event-callbackclj/s

(add-post-event-callback f)
(add-post-event-callback id f)

Registers a function f to be called after each event is processed f will be called with two arguments:

  • event: a vector. The event just processed.
  • queue: a PersistentQueue, possibly empty, of events yet to be processed.

This is useful in advanced cases like:

  • you are implementing a complex bootstrap pipeline
  • you want to create your own handling infrastructure, with perhaps multiple handlers for the one event, etc. Hook in here.
  • libraries providing 'isomorphic javascript' rendering on Nodejs or Nashorn.

'id' is typically a keyword. Supplied at "add time" so it can subsequently be used at "remove time" to get rid of the right callback.

Registers a function `f` to be called after each event is processed
 `f` will be called with two arguments:
  - `event`: a vector. The event just processed.
  - `queue`: a PersistentQueue, possibly empty, of events yet to be processed.

 This is useful in advanced cases like:
   - you are implementing a complex bootstrap pipeline
   - you want to create your own handling infrastructure, with perhaps multiple
     handlers for the one event, etc.  Hook in here.
   - libraries providing 'isomorphic javascript' rendering on  Nodejs or Nashorn.

'id' is typically a keyword. Supplied at "add time" so it can subsequently
be used at "remove time" to get rid of the right callback.
sourceraw docstring

afterclj/s

source

assoc-coeffectclj/s

source

assoc-effectclj/s

source

clear-subscription-cache!clj/s

source

consoleclj/s

source

debugclj/s

source

def-event-ctxclj/s≠macro

clj
(def-event-ctx var-name docstring interceptors arg-list & body)
cljs
(def-event-ctx &form &env var-name docstring interceptors arg-list & body)
source (clj)source (cljs)

def-event-dbclj/s≠macro

clj
(def-event-db var-name docstring interceptors arg-list & body)
cljs
(def-event-db &form &env var-name docstring interceptors arg-list & body)
source (clj)source (cljs)

def-event-fxclj/s≠macro

clj
(def-event-fx var-name docstring interceptors arg-list & body)
cljs
(def-event-fx &form &env var-name docstring interceptors arg-list & body)
source (clj)source (cljs)

def-subclj/s≠macro

clj
(def-sub var-name & args)
cljs
(def-sub &form &env var-name & args)
source (clj)source (cljs)

dispatchclj/s

source

dispatch-syncclj/s

source

enqueueclj/s

source

enrichclj/s

source

get-coeffectclj/s

source

get-def-sub-argsclj/s

(get-def-sub-args args)
source

get-effectclj/s

source

inject-cofxclj/s

source

make-event-ctxclj/s

(make-event-ctx handler)
(make-event-ctx interceptors handler)

Register the given event handler (function) for the given id. Optionally, provide an interceptors chain. id is typically a namespaced keyword (but can be anything) handler is a function: (context-map event-vector) -> context-map

This form of registration is almost never used.

Register the given event `handler` (function) for the given `id`. Optionally, provide
an `interceptors` chain.
`id` is typically a namespaced keyword  (but can be anything)
`handler` is a function: (context-map event-vector) -> context-map

This form of registration is almost never used. 
sourceraw docstring

make-event-dbclj/s

(make-event-db handler)
(make-event-db interceptors handler)

Register the given event handler (function) for the given id. Optionally, provide an interceptors chain. id is typically a namespaced keyword (but can be anything) handler is a function: (db event) -> db interceptors is a collection of interceptors. Will be flattened and nils removed. handler is wrapped in its own interceptor and added to the end of the interceptor chain, so that, in the end, only a chain is registered. Special effects and coeffects interceptors are added to the front of this chain.

Register the given event `handler` (function) for the given `id`. Optionally, provide
an `interceptors` chain.
`id` is typically a namespaced keyword  (but can be anything)
`handler` is a function: (db event) -> db
`interceptors` is a collection of interceptors. Will be flattened and nils removed.
`handler` is wrapped in its own interceptor and added to the end of the interceptor
 chain, so that, in the end, only a chain is registered.
 Special effects and coeffects interceptors are added to the front of this
 chain.
sourceraw docstring

make-event-fxclj/s

(make-event-fx handler)
(make-event-fx interceptors handler)

Register the given event handler (function) for the given id. Optionally, provide an interceptors chain. id is typically a namespaced keyword (but can be anything) handler is a function: (coeffects-map event-vector) -> effects-map interceptors is a collection of interceptors. Will be flattened and nils removed. handler is wrapped in its own interceptor and added to the end of the interceptor chain, so that, in the end, only a chain is registered. Special effects and coeffects interceptors are added to the front of the interceptor chain. These interceptors inject the value of app-db into coeffects, and, later, action effects.

Register the given event `handler` (function) for the given `id`. Optionally, provide
an `interceptors` chain.
`id` is typically a namespaced keyword  (but can be anything)
`handler` is a function: (coeffects-map event-vector) -> effects-map
`interceptors` is a collection of interceptors. Will be flattened and nils removed.
`handler` is wrapped in its own interceptor and added to the end of the interceptor
 chain, so that, in the end, only a chain is registered.
 Special effects and coeffects interceptors are added to the front of the
 interceptor chain.  These interceptors inject the value of app-db into coeffects,
 and, later, action effects.
sourceraw docstring

make-restore-fnclj/s

(make-restore-fn)

Checkpoints the state of re-frame and returns a function which, when later called, will restore re-frame to that checkpointed state.

Checkpoint includes app-db, all registered handlers and all subscriptions.

Checkpoints the state of re-frame and returns a function which, when
later called, will restore re-frame to that checkpointed state.

Checkpoint includes app-db, all registered handlers and all subscriptions.
sourceraw docstring

make-subscription-fnclj/s

source

on-changesclj/s

source

pathclj/s

source

purge-event-queueclj/s

(purge-event-queue)

Remove all events queued for processing

Remove all events queued for processing
sourceraw docstring

remove-post-event-callbackclj/s

(remove-post-event-callback id)
source

set-loggers!clj/s

source

subscribeclj/s

source

trim-vclj/s

source

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

× close