--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
om/IRenderState
(render-state [_ state]
(let [services (get-in app-state[:selected-domain :services])
first-name (:name (first services))]
(println first-name)
(if (:show state)
(dom/div nil
(om/build header/component (get-in app-state [:selected-domain]))
(om/build customer-info/component (get-in app-state [:selected-domain :customer-info]))
(om/build service-info/component services
{:init-state {:selected-service first-name}}))
(dom/span nil ""))))))
Maybe it is not a good idea to build components inside the render-state function ?
Still don't know why the component gets rendered twice.
It would be nice if multiple changes to the state could be combined in a transaction so that the rendering happens after the transaction commits. Is this possible ?
Something like:
(do-transact
(transact! data #(assoc % :foo "foo" :bar "bar"))
(update-state! owner #(assoc % :foo "foo" :bar "bar")))