This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-08
Channels
- # asami (7)
- # aws (2)
- # babashka (21)
- # beginners (602)
- # calva (8)
- # cider (11)
- # clj-kondo (10)
- # cljfx (1)
- # clojure (177)
- # clojure-europe (43)
- # clojure-nl (3)
- # clojure-taiwan (2)
- # clojure-uk (45)
- # clojurescript (31)
- # depstar (8)
- # figwheel-main (2)
- # fulcro (12)
- # hugsql (2)
- # java (1)
- # jobs (2)
- # meander (1)
- # missionary (1)
- # off-topic (67)
- # other-languages (1)
- # pathom (212)
- # polylith (4)
- # rdf (1)
- # re-frame (10)
- # reagent (12)
- # reitit (28)
- # reveal (3)
- # shadow-cljs (21)
- # spacemacs (7)
- # sql (5)
- # tools-deps (12)
- # vim (1)
Hi there. I'm trying to use a reagent-material-ui component that wraps this one: https://material-ui.com/api/bottom-navigation-action/ Unfortunately I can't figure out, how to pass the icon prop. The example code uses this
<BottomNavigationAction label="Archive" icon={<ArchiveIcon />} />
I translated this into the following ClojureScript but to no avail:
[mui/bottom-navigation-action
{:label "Test
:icon [reagent-material-ui.icons.mail]}]
I get the following error:
error when calling lifecycle function ....core/mount-root Error: Objects are not valid as a React child (found: object with keys {tag, id, className, displayName}). If you meant to render a collection of children, use an array instead.
How do I pass props of the type "node" properly? Many thanks in advance.I was hoping to avoid importing "naked" js components and use the ones already wrapped in reagent-material-ui. Guessing thats not possible in this case then?
No idea about wrappers. Probably they handle this in some way.
And the as-element
also works with wrapper elements.
Unfortunately it doesn't. I'll see what else I can find on the matter. Thanks for the help.
https://github.com/arttuka/reagent-material-ui/blob/master/example/src/example/core.cljs#L136
I restarted shadowcljs and now it works... Thanks 🙂
if i make a reagent-frontend project, how can i produce a simple compiled javascript that i can move to my django's static folder ?