(child-components dom)collects child components of component tree
collects child components of component tree
(component-install tag class template {:keys [mixins] :as meta})installs component given template and mixins
installs component given template and mixins
(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?})
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?})(defcomp tag doc? attr? & [bindings & body])defines a component
defines a component
(dom-apply-component {:keys [tag] :as dom} ops)applies operations to component dom
applies operations to component dom
(dom-component? obj)checks if dom is that of a component
(dom-component? (base/dom-compile [:mock/pane-static])) => true
checks if dom is that of a component (dom-component? (base/dom-compile [:mock/pane-static])) => true
(dom-ops-component tag props-old props-new)constructs transform operations for component dom
constructs transform operations for component dom
(dom-remove-component {:keys [tag] :as dom})removes rendered component from dom
removes rendered component from dom
(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"}]]
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 {:keys [tag] :as dom} new-dom)default replace operation for components
default replace operation for components
(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}
updates the state with given value
(dom-state-handler nil {:state (atom {})
:cursor [:data]
:new "hello"
:transform keyword})
=> {:data :hello}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |