std.dom.react

*react*

dynamic

*react-mute*

dynamic

*scheduler*

dynamic

dom-set-state

added in 3.0

(dom-set-state {:keys [state key cursor new transform mute], :or {transform identity}})

sets a state given function params

(def -state- (atom {}))

(do (dom-set-state {:state -state- :key :hello :new 1 :transform str}) @-state-) => {:hello “1”}

flush-updates

added in 4.0

(flush-updates)

flushes all pending updates

react

added in 3.0

(react ref)(react ref path & more)

call to react, for use within component

(binding react (volatile! #{}) (react (atom {:data 1}) :data)) => 1

reactive

reactive-pre-remove

added in 3.0

(reactive-pre-remove dom)

removes the react key and react store

(-> (doto (base/dom-create :mock/label) (reactive-pre-render :hello) (reactive-pre-remove)) :cache) => {}

reactive-pre-render

added in 3.0

(reactive-pre-render dom)(reactive-pre-render dom key)

sets up the react key and react store

(-> (doto (base/dom-create :mock/label) (reactive-pre-render :hello)) :cache) => {:react/key :hello, :react/store #{}}

reactive-wrap-template

added in 3.0

(reactive-wrap-template template-fn)

reactive wrapper function for :template

schedule-update

added in 4.0

(schedule-update dom)

schedules a component update

with-scheduler

macro

added in 4.0

(with-scheduler & body)

executes body with a scheduler bound