I noticed a couple of people mentioning that they wrap components to get around a warning in react-navigation, something about an invalid component name.
Iโm not sure itโs in the docs, but after digging around in reagentโs code, I found that reagent will take a display-name meta attribute as an override for the name of the component, meaning we can specify SomethingValid`
and avoid having to wrap components, or ignore warnings. Hereโs an example:
(r/reactify-component (with-meta (fn name [{:keys [^js route]}]
[component {:route (bean/->clj route)}])
{:display-name display-name}))
hope this helps someone ๐https://www.reddit.com/r/Clojure/comments/tp8bua/react_native_with_reagent_complains_about_react/ left a comment here too.
This should be pinned! ๐ I had to ignore those warnings (using logbox), thanks for sharing this!
on another topic - I canโt figure out yet, how to make the navigator not lose state on reload - Iโm using shadow. How do you all handle this?
answering my own question.. missed the doc page which describes in detail how to do this ๐ https://reactnavigation.org/docs/state-persistence
hey, you already answered it, but i add link to similar question asked in this channel before https://clojurians.slack.com/archives/C0E1SN0NM/p1652439790706039?thread_ts=1652431961.516389&cid=C0E1SN0NM
ty @trybeee!