This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-16
Channels
- # announcements (18)
- # architecture (12)
- # babashka (20)
- # beginners (32)
- # biff (21)
- # calva (81)
- # clerk (6)
- # clj-kondo (16)
- # clj-otel (5)
- # cljsrn (8)
- # clojure (94)
- # clojure-austin (1)
- # clojure-australia (1)
- # clojure-europe (68)
- # clojure-nl (2)
- # clojure-norway (6)
- # clojure-uk (2)
- # clojurescript (13)
- # conjure (1)
- # core-logic (1)
- # cursive (7)
- # data-science (2)
- # datahike (3)
- # datomic (12)
- # emacs (33)
- # etaoin (1)
- # fulcro (8)
- # graalvm (2)
- # graphql (1)
- # honeysql (1)
- # hyperfiddle (97)
- # improve-getting-started (40)
- # jobs (2)
- # jobs-discuss (12)
- # lsp (9)
- # membrane (6)
- # nbb (2)
- # off-topic (16)
- # portal (6)
- # re-frame (2)
- # reagent (3)
- # releases (2)
- # remote-jobs (1)
- # tools-deps (7)
- # xtdb (38)
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