Liking cljdoc? Tell your friends :D

jtk-dvlp.re-frame.tasks


as-taskcljs

(as-task)
(as-task name-or-task)
(as-task name-or-task fxs)

Creates an interceptor to mark an event as task. Give it a name of the task or map with at least a :name key or nil / nothing to use the event name. Tasks can be used via subscriptions ::tasks and ::running?.

Given vector fxs will be used to identify effects to monitor for the task. Can be the keyword of the effect or an vector of effects path (to handle special :fx effect). Completion keys must be set by set-completion-keys-per-effect! or merge-completion-keys-per-effect! for the effects.

Within your event handler use ::task as effect to modify your task data.

Works in combination with https://github.com/jtkDvlp/re-frame-async-coeffects. For async coeffects there is no need to define what to monitor. Coeffects will be monitored automatically.

Creates an interceptor to mark an event as task.
Give it a name of the task or map with at least a `:name` key or nil / nothing to use the event name.
Tasks can be used via subscriptions `::tasks` and `::running?`.

Given vector `fxs` will be used to identify effects to monitor for the task. Can be the keyword of the effect or an vector of effects path (to handle special :fx effect). Completion keys must be set by `set-completion-keys-per-effect!` or `merge-completion-keys-per-effect!` for the effects.

Within your event handler use `::task` as effect to modify your task data.

Works in combination with https://github.com/jtkDvlp/re-frame-async-coeffects. For async coeffects there is no need to define what to monitor. Coeffects will be monitored automatically.
sourceraw docstring

assoc-orignal-eventcljs

(assoc-orignal-event event original-event)

Assocs original-event within maybe task event, returns maybe modified event.

Assocs `original-event` within maybe task `event`, returns maybe modified `event`.
sourceraw docstring

ensure-original-eventcljs

(ensure-original-event event original-event)

Ensures original-event for direct use or with task.

Ensures `original-event` for direct use or with task.
sourceraw docstring

merge-completion-keys-per-effect!cljs

Merge completion keys per effect.

Merge completion keys per effect.
sourceraw docstring

registercljs

(register db {:keys [:jtk-dvlp.re-frame.tasks/id] :as task})

Register task within app state. Also see event ::register. Tasks can be used via subscriptions ::tasks and ::running?.

Register task within app state. Also see event `::register`.
Tasks can be used via subscriptions `::tasks` and `::running?`.
sourceraw docstring

set-completion-keys-per-effect!cljs

Sets completion keys per effect.

Sets completion keys per effect.
sourceraw docstring

some-original-event?cljs

(some-original-event? event)

Checks for some original event of task or event itself.

Checks for some original event of task or `event` itself.
sourceraw docstring

task-event?cljs

(task-event? event)

Check if event is task based, alias ::unregister-and-dispatch-original

Check if event is task based, alias `::unregister-and-dispatch-original`
sourceraw docstring

unregistercljs

(unregister db id-or-task)

Unregister task within app state. Also see event ::unregister and ::unregister-and-dispatch-original. Tasks can be used via subscriptions ::tasks and ::running?.

Unregister task within app state. Also see event `::unregister` and `::unregister-and-dispatch-original`.
Tasks can be used via subscriptions `::tasks` and `::running?`.
sourceraw docstring

update-original-eventcljs

(update-original-event event f & args)

Updates original event of maybe task event, returns maybe modified event.

Updates original event of maybe task `event`, returns maybe modified `event`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close