Liking cljdoc? Tell your friends :D

space.matterandvoid.subscriptions.impl.fulcro


<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

app-state-keyclj/s

source

cache-lookupclj/s

(cache-lookup app cache-key)
source

cleanup!clj/s

(cleanup! this)

Intended to be called when a component unmounts to clear the registered Reaction.

Intended to be called when a component unmounts to clear the registered Reaction.
sourceraw docstring

clear-handlersclj/s

(clear-handlers _app)
(clear-handlers _app id)
source

clear-subclj/s

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

clear-subscription-cache!clj/s

(clear-subscription-cache! registry)
source

deflayer2-subcljmacro

(deflayer2-sub meta-sub-kw sub-name ?path)

Takes a symbol for a subscription name and a way to derive a path in your fulcro app db. Returns a function subscription which itself returns a Reagent RCursor. Supports a vector path, a single keyword, or a function which takes the RAtom datasource and 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 [db-atom sub-args-map] [:a-key (:some-val sub-args-map])))

Takes a symbol for a subscription name and a way to derive a path in your fulcro app db. Returns a function subscription
which itself returns a Reagent RCursor.
Supports a vector path, a single keyword, or a function which takes the RAtom datasource and 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 [db-atom sub-args-map] [:a-key (:some-val sub-args-map])))
sourceraw docstring

defsubrawcljmacro

(defsubraw meta-sub-kw sub-name args body)

Creates a subscription function that takes the datasource ratom and optionally an args map and returns the subscription value. The return value is wrapped in a Reaction for you, so you do not need to.

Creates a subscription function that takes the datasource ratom and optionally an args map and
returns the subscription value. The return value is wrapped in a Reaction for you, so you do not need to.
sourceraw docstring

deref-input-signalsclj/s

source

dispose-current-reaction!clj/s

(dispose-current-reaction! this)
source

get-cache-keyclj/s

(get-cache-key _app [query-key :as query-v])
source

get-component-reactionclj/s

(get-component-reaction this)
source

get-handlerclj/s

(get-handler id)

Returns a "handler" function registered for the subscription with the given id. Fulcro app and 'query-id' -> subscription handler function. Lookup in the place where the query-id -> handler functions are stored.

Returns a "handler" function registered for the subscription with the given `id`.
Fulcro app and 'query-id' -> subscription handler function.
Lookup in the place where the query-id -> handler functions are stored.
sourceraw docstring

get-input-db-signalclj/s

(get-input-db-signal app)

Given the storage for the subscriptions return an atom containing a map (this it the 'db' in re-frame parlance). this assumes you've set your fulcro app's state-atom to be reagent reactive atom.

Given the storage for the subscriptions return an atom containing a map
(this it the 'db' in re-frame parlance).
this assumes you've set your fulcro app's state-atom to be reagent reactive atom.
sourceraw docstring

get-subscription-cacheclj/s

(get-subscription-cache app)
source

handler-registry_clj/s

source

make-sub-fnclj/s

(make-sub-fn meta-sub-kw query-id sub-args)
source

parse-reg-sub-argsclj/s

(parse-reg-sub-args args)
source

reaction-callbackclj/s

(reaction-callback this)
source

reaction-keyclj/s

source

refresh-component!clj/s

(refresh-component! this)
source

reg-layer2-subclj/s

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

Registers a handler function that returns a Reagent RCursor instead of a Reagent Reaction. Accepts a single keyword, a vector path into or a function which takes your db atom and arguments map passed to subscribe and must return a vector path to be used for the cursor.

Registers a handler function that returns a Reagent RCursor instead of a Reagent Reaction.
Accepts a single keyword, a vector path into or a function which takes your db atom and arguments map passed to subscribe
and must return a vector path to be used for the cursor.
sourceraw docstring

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

remove-reaction!clj/s

(remove-reaction! this)
source

set-args-merge-fn!clj/s

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

set-memoize-fn!clj/s

(set-memoize-fn! f)
source

setup-reaction!clj/s

(setup-reaction! this client-render)

Installs a Reaction on the provided component which will re-render the component when any of the subscriptions' values change.

Installs a Reaction on the provided component which will re-render the component when any of the subscriptions'
values change.
sourceraw docstring

state-keyclj/s

source

state-pathclj/s

(state-path)
(state-path k)
(state-path k v)
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

sub-fn->sub-nameclj/s

(sub-fn->sub-name sub-fn query)
source

sub-meta-name-kw*clj/s

source

sub-missing-name!clj/s

(sub-missing-name! sub-fn query)
source

subs-cache->fulcro-app-stateclj/s

(subs-cache->fulcro-app-state app)
source

subs-cache_clj/s

source

subs-keyclj/s

source

subs-state-pathclj/s

(subs-state-path k v)
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