This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-09
Channels
- # aleph (21)
- # architecture (5)
- # boot (25)
- # cider (1)
- # cljs-dev (115)
- # clojure (59)
- # clojure-brasil (3)
- # clojure-dev (4)
- # clojure-italy (20)
- # clojure-nl (2)
- # clojure-portugal (6)
- # clojure-russia (12)
- # clojure-spec (43)
- # clojure-uk (37)
- # clojurescript (76)
- # datomic (123)
- # emacs (3)
- # graphql (2)
- # hoplon (5)
- # jobs-discuss (1)
- # jobs-rus (4)
- # keechma (7)
- # lein-figwheel (13)
- # leiningen (7)
- # lumo (2)
- # off-topic (17)
- # om (6)
- # onyx (26)
- # parinfer (19)
- # planck (2)
- # re-frame (80)
- # reagent (9)
- # ring (1)
- # spacemacs (45)
- # testing (1)
- # vim (28)
Is there a way to convert a reagent component [:like "this"] to a node I can pass to appendChild?
@pupeno Not cleanly, but you could use reagent.dom.server/render-to-string
and call document.createElement
with that
e.g https://github.com/teropa/hiccups is probably much better fit for this as you don't really need React for anything in this case
@juhoteperi I need react and I wouldn't use hiccups as it's prone to XSS.
Ah... that might be a different Hiccup.
No React features will work if you render React component somehow and put that to DOM using appendChild
I'm creating a custom class, but I get your point.
Maybe you want to use reagent/as-element
instead? That will return native React element you can pass to other components
Possibly.