Liking cljdoc? Tell your friends :D

space.matterandvoid.subscriptions.impl.core


<subclj/s

(<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.
sourceraw docstring

cache-lookupclj/s

(cache-lookup datasource cache-key)
source

clear-handlersclj/s

(clear-handlers _db)
(clear-handlers _db id)
source

clear-subclj/s

(clear-sub registry)
(clear-sub registry query-id)
source

clear-subscription-cache!clj/s

(clear-subscription-cache! registry)

Removes all subscriptions from the cache.

Removes all subscriptions from the cache.
sourceraw docstring

deflayer2-subcljmacro

(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])))
sourceraw docstring

deref-input-signalsclj/s

source

get-cache-keyclj/s

(get-cache-key datasource query-v)
source

get-handlerclj/s

(get-handler id)
source

get-input-db-signalclj/s

(get-input-db-signal ratom)
source

get-subscription-cacheclj/s

(get-subscription-cache _app)
source

handler-registry_clj/s

source

parse-reg-sub-argsclj/s

(parse-reg-sub-args args)
source

reg-layer2-subclj/s

(reg-layer2-sub query-id path-vec-or-fn)
source

reg-subclj/s

(reg-sub query-id & args)
source

reg-sub-rawclj/s

(reg-sub-raw query-id handler-fn)
source

register-handler!clj/s

(register-handler! id handler-fn)

Returns handler-fn after associng it in the map.

Returns `handler-fn` after associng it in the map.
sourceraw docstring

set-args-merge-fn!clj/s

(set-args-merge-fn! f)
source

set-memoize-fn!clj/s

(set-memoize-fn! f)
source

sub-fnclj/s

(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.
sourceraw docstring

subs-cache_clj/s

source

subs-state-pathclj/s

(subs-state-path k)
source

subscribeclj/s

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close