Liking cljdoc? Tell your friends :D

re-frame.core


->interceptor

source

add-post-event-callback

(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

after

source

assoc-coeffect

source

assoc-effect

source

clear-cofx

source

clear-event

source

clear-fx

source

clear-sub

source

clear-subscription-cache!

source

console

source

debug

source

dispatch

source

dispatch-sync

source

enqueue

source

enrich

source

get-coeffect

source

get-effect

source

inject-cofx

source

make-restore-fn

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

source

path

source

purge-event-queue

(purge-event-queue)

Remove all events queued for processing

Remove all events queued for processing
sourceraw docstring

reg-cofx

source

reg-event-ctx

(reg-event-ctx id handler)
(reg-event-ctx id 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

reg-event-db

(reg-event-db id handler)
(reg-event-db id 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

reg-event-fx

(reg-event-fx id handler)
(reg-event-fx id 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

reg-fx

source

reg-sub

source

reg-sub-raw

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

This is a low level, advanced function. You should probably be using reg-sub instead. Docs in https://github.com/Day8/re-frame/blob/master/docs/SubscriptionFlow.md

This is a low level, advanced function.  You should probably be
using reg-sub instead.
Docs in https://github.com/Day8/re-frame/blob/master/docs/SubscriptionFlow.md
sourceraw docstring

register-handler

(register-handler & args)
source

register-sub

(register-sub & args)
source

remove-post-event-callback

(remove-post-event-callback id)
source

set-loggers!

source

subscribe

source

trim-v

source

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

× close