(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})
(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:
:on-change
handler of a text field where we are expecting fast typing.
2 when initialising your app - see 'main' in todomvc examplesUsage: (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])
(-run-queue this)
(remove-post-event-callback this f)
(-add-event this event)
(-resume this)
(push this event)
(-run-next-tick this)
(-fsm-trigger this trigger arg)
(-pause this later-fn)
(add-post-event-callback this id callack)
(-process-1st-event-in-queue this)
(-call-post-event-callbacks this event)
(purge this)
(-exception this ex)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close