From a Ring request to the plain event message a component's flow takes
(see taia.ds.datastar.use-cases.process-event.common). This is the only
place that knows where Datastar puts things in a request: the event's
params, the component's slice of the signal store, the logged user.
From a Ring request to the plain event message a component's flow takes (see `taia.ds.datastar.use-cases.process-event.common`). This is the only place that knows where Datastar puts things in a request: the event's params, the component's slice of the signal store, the logged user.
(->event-msg req component-id event-name)The flow's in-chan message for event-name arriving with req; the
caller's trace rides along.
The flow's in-chan message for `event-name` arriving with `req`; the caller's trace rides along.
(event req component-id event-name)[event-name params]: the params are the query/form params plus every key of
the JSON body that is not this component's own slice (so other components'
signals ride along), minus the plumbing keys (:logged-user,
:component-name, and the raw :datastar GET store).
[event-name params]: the params are the query/form params plus every key of the JSON body that is not this component's own slice (so other components' signals ride along), minus the plumbing keys (`:logged-user`, `:component-name`, and the raw `:datastar` GET store).
(request-ctx req)What a request brings to the ctx besides signals: the logged user, and the app config (attached by the application's middleware) and HTTP method when present.
What a request brings to the ctx besides signals: the logged user, and the app config (attached by the application's middleware) and HTTP method when present.
(signals req component-id)The component's own slice of the client's signal store, or nil. POST events
carry the store as the JSON body (:body-params); GET events — e.g. an
@get to /ds/nds-connect/… — carry the SAME store as the datastar query
param. A present body wins.
The component's own slice of the client's signal store, or nil. POST events carry the store as the JSON body (`:body-params`); GET events — e.g. an @get to /ds/nds-connect/… — carry the SAME store as the `datastar` query param. A present body wins.
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 |