(defn- component [services owner]
(reify
om/IInitState
(init-state [_]
(println "init-state")
{:selected-service (:name (first services))
})
om/IRenderState
(render-state [_ state]
(println services)
(dom/div nil))
And I create it like this:
(om/build (service-info/create
(get-in app-state [:selected-domain :domain]) select-service-chan)
(get-in app-state[:selected-domain :services]))
init-state is only called the first time the above code is called. Is this expected ? If it is, how can I completely destroy the component and start from scratch ?
This event is called if the element is unmounted. But how do i unmount a component ?
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/ul5L7Qa5yjg/unsubscribe.
To unsubscribe from this group and all its topics, 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.