(broadcast! command payload)Broadcast pipeline sideffect.
Accepts command and payload arguments.
Broadcast pipeline sideffect. Accepts `command` and `payload` arguments.
(commit! value)(commit! value cb)Commit pipeline sideffect.
Accepts value or value and callback as arguments. Value should be a new version of app-db.
(commit! (assoc-in app-db [:kv :user] {:username "retro"}))
If the callback argument is present, this function will be called immediately after the app-db-atom is updated. This is useful if you want to force Reagent to re-render the screen.
Commit pipeline sideffect.
Accepts `value` or `value` and `callback` as arguments. Value should be a new version of app-db.
```clojure
(commit! (assoc-in app-db [:kv :user] {:username "retro"}))
```
If the callback argument is present, this function will be called immediately after the app-db-atom is updated.
This is useful if you want to force Reagent to re-render the screen.(do! & sideffects)Runs multiple sideffects sequentially:
(do!
(commit! (assoc-in app-db [:kv :current-user] value))
(redirect! {:page "user" :id (:id user)}))
Runs multiple sideffects sequentially:
```clojure
(do!
(commit! (assoc-in app-db [:kv :current-user] value))
(redirect! {:page "user" :id (:id user)}))
```(execute! command)(execute! command payload)Execute pipeline sideffect.
Accepts command and payload arguments. Use this if you want to execute a command on the current controller.
Execute pipeline sideffect. Accepts `command` and `payload` arguments. Use this if you want to execute a command on the current controller.
(redirect! params)(redirect! params action)Redirect pipeline sideffect.
Accepts params argument. Page will be redirected to a new URL which will be generated from the passed in params argument. If you need to
access the current route data, it is present in the pipeline app-db argument under the [:route :data] path.
Redirect pipeline sideffect. Accepts `params` argument. Page will be redirected to a new URL which will be generated from the passed in params argument. If you need to access the current route data, it is present in the pipeline `app-db` argument under the `[:route :data]` path.
(run-pipeline! pipeline-key)(run-pipeline! pipeline-key args)Runs a pipeline in a way that blocks the current pipeline until the current pipeline is done. It behaves same as `execute! but blocks the parent pipeline until it's done. Return value and errors will be ignored by the parent pipeline.
Runs a pipeline in a way that blocks the current pipeline until the current pipeline is done. It behaves same as `execute! but blocks the parent pipeline until it's done. Return value and errors will be ignored by the parent pipeline.
(send-command! command)(send-command! command payload)Send command pipeline sideffect.
Accepts command and payload arguments. Command should be a vector where first element is the controller topic, and the second
element is the command name.
Send command pipeline sideffect. Accepts `command` and `payload` arguments. Command should be a vector where first element is the controller topic, and the second element is the command name.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |