Fork me on GitHub
#cljsrn
<
2020-05-03
>
Oliver George02:05:57

Righto. My issue is with react-navigation. Here is a repro repo: https://github.com/olivergeorge/krell-repros/tree/react-navigation-3

Oliver George02:05:55

If I change something in the view ns like the container1 text it's not displayed. If I cause the core namespace to reload (say add some whitespace and save the file) then the view updates.

Oliver George03:05:23

For completeness I've done the same for v4 and v5. Same issue.

Oliver George04:05:34

(slight variations on which file needs to change to get the view to update on v5)

Oliver George06:05:36

I think I have a solution, via re-render with key prop...

(def cnt (r/atom 0))

(defn app []
  [navigation-screen/container {:key @cnt}])

(defn ^:export -main [& args]
  (swap! cnt inc)
  (r/as-element [app]))
Still thinking this through. I suspect it will wipe component local state across the app - not sure if that's a problem or not but makes it a bit of a crude implement.

dnolen15:05:59

solving interactions with various components doesn't seem practical for Krell - I simply haven't seen this particular problem in our app

dnolen15:05:16

the thing I'm interested in is why this wasn't a problem for you in re-natal - or maybe you got far enough along where you stopped noticing?

Oliver George21:05:28

I’m not sure about that either. Wondering if the caching Is more aggressive on recent version of react / reach native.

Oliver George21:05:43

I’ll try for a re-natal repro

Oliver George21:05:59

Also wondering if figwheel is reloading dependent namespaces. E.g. changing views causes nav to reload.

dnolen23:05:46

currently we're not reloading dependent namespaces - though that's trivial to add now

dnolen23:05:56

we also don't handle all the macros cases - though in my opinion this is not necessary for the alpha

dnolen23:05:13

dependent namespaces probably