Looks like Om 0.7.0 solves this issue already, so we don't have to return
functions instead or use condp anymore.
On Wednesday, July 23, 2014 5:04:17 PM UTC+10, Adam Comella wrote:
Instead of having the multimethods return components, you could have them
return functions which return
On Friday, July 18, 2014 2:02:54 AM UTC+10, Jarppe Länsiö wrote:
I have this same problem. I thought multimethods would be great way to render
different views in simple page app, so I wrote something like this:
(def app-state {:view :login})
(defmulti render-view (fn [app owner]
I have this same problem. I thought multimethods would be great way to render
different views in simple page app, so I wrote something like this:
(def app-state {:view :login})
(defmulti render-view (fn [app owner] (:view app)))
(defmethod render-view :login [app owner]
(om/component
Most likely you are hitting this limitation:
https://github.com/swannodette/om/issues/178
Om uses the function to decide if it needs to unmount/mount components.
Since the multimethod is always the same function (regardless of where it
then dispatches to), Om does not know that the component has
This might help, not too sure though:
https://github.com/hackerschool/community/blob/master/client/src/community/core.cljs#L19-L24
On Thursday, July 17, 2014 12:02:54 PM UTC-4, Jarppe Länsiö wrote:
I have this same problem. I thought multimethods would be great way to render
different views