(<sub app query)
Subscribe and deref a subscription, returning its value, not a reaction.
Subscribe and deref a subscription, returning its value, not a reaction.
(clear-subscription-cache! registry)
Removes all subscriptions from the cache.
Removes all subscriptions from the cache.
(deflayer2-sub meta-sub-kw sub-name ?path)
Only supports use cases where your datasource is a hashmap.
Takes a symbol for a subscription name and a way to derive a path in your datasource hashmap. Returns a function subscription which itself returns a Reagent RCursor. Supports a vector path, a single keyword, or a function which takes the arguments map passed to subscribe and must return a path vector to use as an RCursor path.
Examples:
(deflayer2-sub my-subscription :a-path-in-your-db)
(deflayer2-sub my-subscription [:a-path-in-your-db])
(deflayer2-sub my-subscription (fn [sub-args-map] [:a-key (:some-val sub-args-map])))
Only supports use cases where your datasource is a hashmap. Takes a symbol for a subscription name and a way to derive a path in your datasource hashmap. Returns a function subscription which itself returns a Reagent RCursor. Supports a vector path, a single keyword, or a function which takes the arguments map passed to subscribe and must return a path vector to use as an RCursor path. Examples: (deflayer2-sub my-subscription :a-path-in-your-db) (deflayer2-sub my-subscription [:a-path-in-your-db]) (deflayer2-sub my-subscription (fn [sub-args-map] [:a-key (:some-val sub-args-map])))
(register-handler! id handler-fn)
Returns handler-fn
after associng it in the map.
Returns `handler-fn` after associng it in the map.
(sub-fn meta-fn-key f)
Takes a function that returns either a Reaction or RCursor. Returns a function that when invoked delegates to f
and
derefs its output. The returned function can be used in subscriptions.
Takes a function that returns either a Reaction or RCursor. Returns a function that when invoked delegates to `f` and derefs its output. The returned function can be used in subscriptions.
(subscribe app query)
Given a query
vector, returns a Reagent reaction
which will, over
time, reactively deliver a stream of values. Also known as a Signal
.
To obtain the current value from the Signal, it must be dereferenced
Given a `query` vector, returns a Reagent `reaction` which will, over time, reactively deliver a stream of values. Also known as a `Signal`. To obtain the current value from the Signal, it must be dereferenced
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close