Liking cljdoc? Tell your friends :D

space.matterandvoid.subscriptions.react-hook


use-reactioncljs

(use-reaction r)

Takes a Reagent Reaction and rerenders the UI component when the Reaction's value changes. Returns the current value of the Reaction

Takes a Reagent Reaction and rerenders the UI component when the Reaction's value changes.
Returns the current value of the Reaction
sourceraw docstring

use-reaction-refcljs

(use-reaction-ref r)

Takes a Reagent Reaction inside a React ref and rerenders the UI component when the Reaction's value changes. Returns the current value of the Reaction

Takes a Reagent Reaction inside a React ref and rerenders the UI component when the Reaction's value changes.
Returns the current value of the Reaction
sourceraw docstring

use-subcljs

(use-sub query)
(use-sub data-source query)

A react hook that subscribes to a subscription, the return value of the hook is the return value of the subscription which will cause the consuming react function component to update when the subscription's value updates.

Arguments are a reagent ratom data-source, and a subscription query vector (vector of keyword and an optional hashmap of arguments).

The single-arity version takes only a query map and will use the suscription app-context to read the fulcro app from React context.

A react hook that subscribes to a subscription, the return value of the hook is the return value of the
subscription which will cause the consuming react function component to update when the subscription's value updates.

Arguments are a reagent ratom `data-source`, and a subscription query vector (vector of keyword and an optional hashmap of
arguments).

The single-arity version takes only a query map and will use the suscription app-context to read the fulcro app from
React context.
sourceraw docstring

use-sub-mapcljs

(use-sub-map query-map)
(use-sub-map data-source query-map)

A react hook that subscribes to multiple subscriptions, the return value of the hook is the return value of the subscriptions which will cause the consuming react function component to update when the subscriptions' values update.

Takes a data source (reagent ratom) and a hashmap

  • keys are keywords (qualified or simple) that you make up.
  • values are subscription vectors. Returns a map with the same keys and the values are the subscriptions subscribed and deref'd (thus, being their current values).

The single-arity version takes only a query map and will use the suscription app-context to read the fulcro app from React context.

A react hook that subscribes to multiple subscriptions, the return value of the hook is the return value of the
subscriptions which will cause the consuming react function component to update when the subscriptions' values update.

Takes a data source (reagent ratom) and a hashmap
- keys are keywords (qualified or simple) that you make up.
- values are subscription vectors.
Returns a map with the same keys and the values are the subscriptions subscribed and deref'd (thus, being their current values).

The single-arity version takes only a query map and will use the suscription app-context to read the fulcro app from
React context.
sourceraw docstring

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

× close