Fork me on GitHub
#reagent
<
2017-02-05
>
Pablo Fernandez12:02:01

Odd... using a method as a reagent component used to work well and now it isn't. I'm not sure why.

Pablo Fernandez12:02:26

Modifying the component doesn't properly re-load it. Does anybody know how to fix that?

pesterhazy12:02:48

What do you mean by method?

pesterhazy12:02:27

Yeah that's always been tricky

pesterhazy12:02:09

I'd recommend not using multimethods or wrapping it in a fn

Pablo Fernandez12:02:11

I wonder how do people dispatch their main component with multimethod. I can wrap the component in a function, but it's ugly.

Pablo Fernandez12:02:32

I remember this working properly at some point, but I can't get it to work again.

pesterhazy12:02:28

I'd love to understand just why it doesn't work

pesterhazy12:02:48

A failing unit test for Reagent would be a great start

emccue20:02:17

Are all the methods for the multimethod in the same file?

emccue20:02:38

For me, I had to go the wrapping it in a function route

emccue20:02:16

(defn root [main-panel] [:div ...nav stuff... [main-panel]])

emccue20:02:02

(defmulti main-panel (fn [] (subscribe [:current-page]))) and so on

emccue20:02:15

It might have something to do with that all so hidden and magical behaviour of r/atom

emccue20:02:26

Dang now you've got me curious too