Closed noklesta closed 9 years ago
I'd keep the issue open until new reagent gets released from the org with the latest features. Is there any obvious downsides to using force-update-all?
I'm new to reagent and don't really know the code, so I cannot tell for sure. But at least it only applies in dev mode anyway. The commit message says it was introduced to ease integration with LightTable, so it seems to be meant for use in tooling.
Since it would only be invoked in dev mode, it sounds like it might be the right approach here. I'm assuming LT has the same issue as the template.
Fixed in the new version (0.2.2).
If you change a component in a namespace other than core, it won't be re-rendered by the call to core/init! in the jsload-callback in dev/cljs/reagent/dev.cljs. In order to make re-rendering work, I had to replace it by a call to force-update-all.
I would create a pull request, but since force-update-all was introduced in holmsand/reagent@ba995c2e0dc93e8cdad70107c2847294cce2c7fd and reagent-template uses reagent v0.4.2, it won't work until a more recent version of reagent is used. In any case, I am not sure if it is the best approach, but at least it works.