Yes! This is good stuff. Over the weekend, I started working on using Om for a potential "real world" project and I quickly encountered the need for "higher order" polymorphic components. Then I started worrying that maybe I had missed some fundamental concept of Om/React and was complecting. I'm glad to see that wasn't the case, and it looks like I was actually on the right track for my design.
I was initially surprised by the implementation in your tutorial using multimethods instead of protocols, especially since you are only dispatching on a single function. But as I thought about it more, I realized this could be a perfect place for multiple dispatch, i.e. swapping components based on multiple pieces of application state. Powerful stuff! One question - I've tended to shy away from multimethods because of the performance hit, but this is a compelling case for their usage. Just how big of a performance hit are we talking about, compared to protocols or regular function invocation? On Sunday, January 26, 2014 9:19:03 PM UTC-6, David Nolen wrote: > Glad to hear it. I recommend taking a look at the new section "Higher Order > Components" > http://github.com/swannodette/om/wiki/Tutorial#wiki-higher-order-components, > we're finally getting to the "good stuff" IMO :) -- 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.
