(broadcast! _ _ & _)
dummy broadcast!
dummy broadcast!
(broadcast! reconciler event & args)
Invoke an event on all controllers asynchronously
(citrus/broadcast! reconciler :init)
Arguments
reconciler - an instance of Reconciler event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
Invoke an event on all controllers asynchronously (citrus/broadcast! reconciler :init) Arguments reconciler - an instance of Reconciler event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
(broadcast-sync! _ _ & _)
dummy broadcast-sync!
dummy broadcast-sync!
(broadcast-sync! reconciler event & args)
Invoke an event on all controllers synchronously
(citrus/broadcast! reconciler :init)
Arguments
reconciler - an instance of Reconciler event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
Invoke an event on all controllers synchronously (citrus/broadcast! reconciler :init) Arguments reconciler - an instance of Reconciler event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
(defhandler & args)
Create event handler with optional meta data
(citrus/defhandler control :load {:cofx [[:local-storage :key]]} [event args state coeffects] {:state (:local-storage coeffects)})
Create event handler with optional meta data (citrus/defhandler control :load {:cofx [[:local-storage :key]]} [event args state coeffects] {:state (:local-storage coeffects)})
(dispatch! _ _ _ & _)
dummy dispatch!
dummy dispatch!
(dispatch! reconciler controller event & args)
Invoke an event on particular controller asynchronously
(citrus/dispatch! reconciler :users :load "id")
Arguments
reconciler - an instance of Reconciler controller - name of a controller event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
Invoke an event on particular controller asynchronously (citrus/dispatch! reconciler :users :load "id") Arguments reconciler - an instance of Reconciler controller - name of a controller event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
(dispatch-sync! _ _ _ & _)
dummy dispatch-sync!
dummy dispatch-sync!
(dispatch-sync! reconciler controller event & args)
Invoke an event on particular controller synchronously
(citrus/dispatch! reconciler :users :load "id")
Arguments
reconciler - an instance of Reconciler controller - name of a controller event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
Invoke an event on particular controller synchronously (citrus/dispatch! reconciler :users :load "id") Arguments reconciler - an instance of Reconciler controller - name of a controller event - a dispatch value of a method defined in the controller args - arguments to be passed into the controller
(reconciler {:keys [state resolvers]})
Accepts a hash of :state
atom & :resolvers
hash of subscription resolvers where keys are subscription path vectors and values are data resolving functions
{:state (atom {}) :resolvers {[:counter] fetch-counter}}
Returns a hash of resolvers
and state
atom which will be populated with resolved subscriptions data during rendering
Accepts a hash of `:state` atom & `:resolvers` hash of subscription resolvers where keys are subscription path vectors and values are data resolving functions {:state (atom {}) :resolvers {[:counter] fetch-counter}} Returns a hash of `resolvers` and `state` atom which will be populated with resolved subscriptions data during rendering
(reconciler {:keys [state controllers effect-handlers co-effects batched-updates
chunked-updates]
:citrus/keys [handler]}
&
{:as options})
Creates an instance of Reconciler
(citrus/reconciler {:state (atom {}) :controllers {:counter counter/control} :effect-handlers {:http effects/http} :batched-updates {:schedule-fn f :release-fn f'} :chunked-updates f})
Arguments
config - a map of
state - app state atom
controllers - a map of state controllers
citrus/handler - a function to handle incoming events (see doc/custom-handler.md)
effect-handlers - a map of effects handlers
batched-updates - a map of two functions used to batch reconciler updates, defaults to
{:schedule-fn js/requestAnimationFrame :release-fn js/cancelAnimationFrame}
chunked-updates - a function used to divide reconciler update into chunks, doesn't used by default
Returned value supports deref, watches and metadata.
The only supported option is :meta
Creates an instance of Reconciler (citrus/reconciler {:state (atom {}) :controllers {:counter counter/control} :effect-handlers {:http effects/http} :batched-updates {:schedule-fn f :release-fn f'} :chunked-updates f}) Arguments config - a map of state - app state atom controllers - a map of state controllers citrus/handler - a function to handle incoming events (see doc/custom-handler.md) effect-handlers - a map of effects handlers batched-updates - a map of two functions used to batch reconciler updates, defaults to `{:schedule-fn js/requestAnimationFrame :release-fn js/cancelAnimationFrame}` chunked-updates - a function used to divide reconciler update into chunks, doesn't used by default Returned value supports deref, watches and metadata. The only supported option is `:meta`
(subscription reconciler path)
(subscription {:keys [state resolvers]} path reducer)
Create a subscription to state updates
(citrus/subscription reconciler [:users 0] (juxt [:fname :lname]))
Arguments
reconciler - reconciler hash path - a vector which describes a path into resolver's result value reducer - an aggregate function which computes a materialized view of data behind the path
Create a subscription to state updates (citrus/subscription reconciler [:users 0] (juxt [:fname :lname])) Arguments reconciler - reconciler hash path - a vector which describes a path into resolver's result value reducer - an aggregate function which computes a materialized view of data behind the path
(subscription reconciler path)
(subscription reconciler path reducer)
Create a subscription to state updates
(citrus/subscription reconciler [:users 0] (juxt [:fname :lname]))
Arguments
reconciler - an instance of Reconciler path - a vector which describes a path into reconciler's atom value reducer - an aggregate function which computes a materialized view of data behind the path
Create a subscription to state updates (citrus/subscription reconciler [:users 0] (juxt [:fname :lname])) Arguments reconciler - an instance of Reconciler path - a vector which describes a path into reconciler's atom value reducer - an aggregate function which computes a materialized view of data behind the path
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close