This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-08
Channels
- # alda (10)
- # beginners (15)
- # boot (16)
- # business (2)
- # clojure (68)
- # clojure-czech (1)
- # clojure-italy (3)
- # clojure-japan (71)
- # clojure-russia (32)
- # clojure-uk (2)
- # clojurescript (134)
- # core-async (84)
- # datomic (27)
- # devcards (13)
- # hoplon (3)
- # ldnclj (8)
- # ldnproclodo (1)
- # lein-figwheel (2)
- # melbourne (1)
- # off-topic (29)
- # om (53)
- # re-frame (7)
- # reagent (15)
- # yada (50)
If I want to leverage pre-existing React components (like for example https://github.com/azmenak/react-stripe-checkout), how do I go about getting Reagent to render it ?
jstaffans: reagent.core/adapt-react-class
mccraigmccraig: thanks for the hint. But I assume that Reagent has to "know" about the component when I apply adapt-react-class
. In JavaScript, I would install the component with npm and do something like var Checkout = require('react-stripe-checkout')
in my code
@jstaffans: ha, i've got no idea about that - i've only worked with components with globally visible names and no need to mess around with commonjs or requirejs or such things
react addons already have them... otherwise if you've got something wrapped in some module structure i guess you'll have to write some js which includes them and stuffs a reference somewhere globally visible
you have to be careful with <script> tags - you many need an externs file for use with advanced compilation - https://github.com/clojure/clojurescript/wiki/Compiler-Options#externs
@jstaffans: if you are lucky the lib you need will already be here - http://cljsjs.github.io/ - and you can include it from clojars
Looking at the source it might also be an option to just make an equivalent component in cljs?