reagent-project / reagent-template

A Leiningen template for projects using Reagent.
MIT License
395 stars 55 forks source link

Routing atom should be defined with defonce #141

Closed jmlsf closed 6 years ago

jmlsf commented 6 years ago

The routing atom defined at

https://github.com/reagent-project/reagent-template/blob/c27953b3fd30a816556c6821fbc7076247774848/resources/leiningen/new/reagent/src/cljs/reagent/core.cljs#L20

gets reloaded by figwheel whenever you edit any code. This results in the default home-page component getting reloaded (and gets the current page out of sync with the current URL). I think a one-line change to defonce is what's needed. (It works for me.)

yogthos commented 6 years ago

👍

yogthos commented 6 years ago

just pushed out an update with the change