This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-12
Channels
- # aleph (3)
- # announcements (7)
- # babashka (22)
- # beginners (44)
- # calva (19)
- # chlorine-clover (1)
- # cider (20)
- # clj-kondo (55)
- # clojure (100)
- # clojure-austin (9)
- # clojure-europe (19)
- # clojure-italy (19)
- # clojure-nl (13)
- # clojure-portugal (2)
- # clojure-uk (7)
- # clojurescript (38)
- # community-development (3)
- # conjure (2)
- # cryogen (57)
- # cursive (6)
- # datalog (3)
- # datomic (24)
- # emacs (17)
- # exercism (8)
- # fulcro (3)
- # holy-lambda (8)
- # jobs (6)
- # jobs-discuss (9)
- # joker (3)
- # lambdaisland (5)
- # leiningen (5)
- # music (9)
- # nextjournal (1)
- # nrepl (2)
- # off-topic (9)
- # other-languages (4)
- # pathom (6)
- # polylith (23)
- # re-frame (5)
- # reagent (5)
- # remote-jobs (1)
- # reveal (1)
- # shadow-cljs (3)
- # tools-build (1)
- # tools-deps (3)
- # xtdb (2)
Hi! I have a question regarding children passed to a Reagent component from a React component. Namely, my Reagent component get’s back props
that look like this:
#js {:children #js {"$$typeof" #object[Symbol(react.element)], :type #object[Function], :key nil, :ref nil....etc
How would I go about rendering these children inside of:
(reagent/as-element
[portal
{:container (js/document.querySelector "body")}
"render-children-here"])
It renders the string render-children-here
just fine, but as soon as I replace that with (:children (js->clj props :keywordize-keys true))
it will render the result seemingly as a string like this:
{:$$typeof #object[Symbol(react.element)], :type #object[Function], :key nil, :ref nil, :props {:modifiers [], :placement "bottom-start", :children #object[Function]}, :_owner #object[FiberNode [object Object]], :_store {}}
As opposed to actually rendering the children.