In a small app I\'m building that uses Reagent and Re-frame I\'m using multi-methods to dispatch which page should be shown based on a value in the app state:
(d
I don't have all the details, but apparently, when I was rendering pages like this:
[:main.container
[alerts/view]
[pages @current-route]]
Reagent was failing to notice that pages
depended on the value of @current-route
. The Chrome React plugin helped me figure it out. I tried using a ratom instead of a subscription and that seemed to work fine. Thankfully, telling Reagent/React the key to an element is easy enough:
[:main.container
[alerts/view]
^{:key @current-route} [pages @current-route]]
That works just fine.