Ah I just looked at the code: the past issues with multimethods were when you use one directly as an om component, but you are using it to call build, so your problem is unrelated after all.
It does sound like a bad idea to build components and then pass them around rather than passing the component function although I don't know the details of why this doesn't work. As for change-fn, it works as long as the cursor path doesn't ever change since you're then not actually relying on changes to the closed over value, but in general, Lucas is correct that changes to opts do not cause a rerender - more importantly, they are invisible to the component until unmounting and remounting. On Thu, 4 Dec 2014 13:48 Lucas Bradstreet <[email protected]> wrote: > Glad to hear it. I guess I will avoid that pattern then. > > By the way, I am a little worried about your change-fn below, which closes > over data but is passed in via the opts. I believe there is no guarantee > that an opts update will trigger a re-render. > > :main-component-m {:opts {:change-fn > #(search data true) > }} > > I'm guessing that the subcomponent is being re-rendered every time data > changes in a way that is relevant to it, but I would watch out. > > I try to avoid passing in any info to opts that may change. > > Lucas > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
