std.dom.component
child-components
added in 3.0
(child-components dom)collects child components of component tree
component-install
added in 3.0
(component-install tag class template {:keys [mixins], :as meta})installs component given template and mixins
component-options
added in 3.0
(component-options template mixins)(component-options template mixins ks)prepare component options given template and mixin maps
(component-options (fn dom props (base/dom-compile :mock/label “hello”)) [{:pre-render (fn dom dom)} {:post-render (fn dom dom)}]) => (contains {:pre-render fn? :post-render fn? :template fn?})
dom-apply-component
added in 3.0
(dom-apply-component {:keys [tag], :as dom} ops)applies operations to component dom
dom-component?
added in 3.0
(dom-component? obj)checks if dom is that of a component
(dom-component? (base/dom-compile :mock/pane-static)) => true
dom-ops-component
added in 3.0
(dom-ops-component tag props-old props-new)constructs transform operations for component dom
dom-remove-component
added in 3.0
(dom-remove-component {:keys [tag], :as dom})removes rendered component from dom
dom-render-component
added in 3.0
(dom-render-component {:keys [tag props], :as dom})component dom element rendering function
(-> (base/dom-compile [:mock/pane-static :mock/box-static {:title “a” :content “A”} :mock/box-static {:title “b” :content “B”}]) (dom-render-component) (base/dom-format)) => [:+ :mock/pane-static :+ :mock/box-static {:title “a”, :content “A”} :+ :mock/box-static {:title “b”, :content “B”}]
dom-replace-component
added in 3.0
(dom-replace-component {:keys [tag], :as dom} new-dom)default replace operation for components
dom-state-handler
added in 3.0
(dom-state-handler _ {:keys [cursor state new transform], :as event, :or {transform identity}})updates the state with given value
(dom-state-handler nil {:state (atom {}) :cursor :data :new “hello” :transform keyword}) => {:data :hello}