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-cofxclj/s

source

clear-eventclj/s

source

clear-fxclj/s

source

clear-subclj/s

source

clear-subscription-cache!clj/s

source

consoleclj/s

source

debugclj/s

source

dispatchclj/s

source

dispatch-syncclj/s

source

enqueueclj/s

source

enrichclj/s

source

get-coeffectclj/s

source

get-effectclj/s

source

inject-cofxclj/s

source

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

on-changesclj/s

source

pathclj/s

source

reg-cofxclj/s

source

reg-event-ctxclj/s

(reg-event-ctx id handler)
(reg-event-ctx id interceptors handler)
source

reg-event-dbclj/s

(reg-event-db id db-handler)
(reg-event-db id interceptors db-handler)

Register the given id, typically a keyword, with the combination of db-handler and an interceptor chain. db-handler is a function: (db event) -> db interceptors is a collection of interceptors, possibly nested (needs flattening). db-handler is wrapped in an interceptor and added to the end of the chain, so in the end there is only a chain. The necessary effects and coeffects handler are added to the front of the interceptor chain. These interceptors ensure that app-db is available and updated.

Register the given `id`, typically a keyword, with the combination of
`db-handler` and an interceptor chain.
`db-handler` is a function: (db event) -> db
`interceptors` is a collection of interceptors, possibly nested (needs flattening).
`db-handler` is wrapped in an interceptor and added to the end of the chain, so in the end
 there is only a chain.
 The necessary effects and coeffects handler are added to the front of the
 interceptor chain.  These interceptors ensure that app-db is available and updated.
sourceraw docstring

reg-event-fxclj/s

(reg-event-fx id fx-handler)
(reg-event-fx id interceptors fx-handler)
source

reg-fxclj/s

source

reg-subclj/s

source

reg-sub-rawclj/s

(reg-sub-raw query-id handler-fn)

Associate a given query id with a given subscription handler function handler-fn which is expected to take two arguments: app-db and query vector, and return a reaction.

This is a low level, advanced function. You should probably be using reg-sub instead.

Associate a given `query id` with a given subscription handler function `handler-fn`
 which is expected to take two arguments: app-db and query vector, and return
 a `reaction`.

This is a low level, advanced function.  You should probably be using reg-sub
instead.
sourceraw docstring

register-handlerclj/s

(register-handler & args)
source

register-subclj/s

(register-sub & args)
source

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