I am rendering a number of dynamic components from a list like this:
(map #(om/build clip-view % {:key :id}) clips)
When I render the list like this, it only ever renders the newest item but when I add the wrapper component like this:
(map #(om/build (animate clip-view) % {:key :id}) clips)
The entire list gets re-rendered each time.
At the moment, there is no functionality in my wrapper component which looks like this:
(defn animate [component & args]
(fn [props owner opts]
(reify
om/IRender
(render [_]
(om/build component props {:opts opts})))))
Why would adding the wrapper cause all items to be re-rendered?
Is it because animate is returning an anonymous function which is a no-no (as anonymous functions instances are not equal)?
What happens if you remove the (fn [..]) from animate so animate is (defn animate [...] (reify ...))?
--
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/RUCEFqzwdqQ/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.