Fork me on GitHub
#cljsrn
<
2019-09-12
>
vikeri12:09:35

Hi, did anyone solve hot code reloading changing back to default state in React Navigation?

vikeri12:09:51

Or maybe it’s just our implementation that causes issues

lepistane13:09:27

i thought this was by default! if u solve it pls post here

vikeri13:09:48

I added this where I specify the navigator:

;; Used to get hot code reload to work properly, do not rename
(defonce nav-update-atom
  (r/atom 0))

(defn navigatify
  "Prepares component for being consumed by react-navigation"
  [component]
  (r/reactify-component
    (fn [] [component (when env/development? @nav-update-atom)])))
And then I swap! that atom in the :js-load-callback fn.