Liking cljdoc? Tell your friends :D
Mostly clj/s forms.
Exceptions indicated.

re-frame.router


dispatch

(dispatch event)

Enqueue event for processing by event handling machinery.

event is a vector of length >= 1. The 1st element identifies the kind of event.

Note: the event handler is not run immediately - it is not run synchronously. It will likely be run 'very soon', although it may be added to the end of a FIFO queue which already contain events.

Usage: (dispatch [:order-pizza {:supreme 2 :meatlovers 1 :veg 1})

Enqueue `event` for processing by event handling machinery.

`event` is a vector of length >= 1. The 1st element identifies the kind of event.

Note: the event handler is not run immediately - it is not run
synchronously. It will likely be run 'very soon', although it may be
added to the end of a FIFO queue which already contain events.

Usage:
   (dispatch [:order-pizza {:supreme 2 :meatlovers 1 :veg 1})
sourceraw docstring

dispatch-sync

(dispatch-sync event-v)

Synchronously (immediately) process event. Do not queue.

Generally, don't use this. Instead use dispatch. It is an error to use dispatch-sync within an event handler.

Useful when any delay in processing is a problem:

  1. the :on-change handler of a text field where we are expecting fast typing. 2 when initialising your app - see 'main' in todomvc examples
  2. in a unit test where we don't want the action 'later'

Usage: (dispatch-sync [:sing :falsetto 634])

Synchronously (immediately) process `event`. Do not queue.

Generally, don't use this. Instead use `dispatch`. It is an error
to use `dispatch-sync` within an event handler.

Useful when any delay in processing is a problem:
   1. the `:on-change` handler of a text field where we are expecting fast typing.
   2  when initialising your app - see 'main' in todomvc examples
   3. in a unit test where we don't want the action 'later'

Usage:
   (dispatch-sync [:sing :falsetto 634])
sourceraw docstring

event-queue

source

EventQueue

source

IEventQueueprotocol

-add-event
(-add-event this event)
-call-post-event-callbacks
(-call-post-event-callbacks this event)
-exception
(-exception this ex)
-fsm-trigger
(-fsm-trigger this trigger arg)
-pause
(-pause this later-fn)
-process-1st-event-in-queue
(-process-1st-event-in-queue this)
-resume
(-resume this)
-run-next-tick
(-run-next-tick this)
-run-queue
(-run-queue this)
add-post-event-callback
(add-post-event-callback this id callack)
purge
(purge this)
push
(push this event)
remove-post-event-callback
(remove-post-event-callback this f)
source

later-fns

source

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

× close