Fork me on GitHub
#cljsjs
<
2016-02-15
>
adampash14:02:17

@martinklepsch: hey thanks for reaching out. I eventually figured it out with enough trial and error. I guess as someone who’s never used cljsjs before, it’s not immediately obvious how the libs are imported, and how to correctly access them in clojurescript code. This is definitely a beginner’s problem, probably not a problem for a more experienced Clojurescript developer.

hoopes15:02:53

chiming in uninvited: i agree with @adampash - as a beginner in cljs, a super-simple example of cljsjs usage would help me out quite a bit.

martinklepsch15:02:00

Maybe each readme should have a little section like "adding this to your dependencies and requiring it makes the library available in the global js namespace, i.e. js/React"

martinklepsch15:02:13

@adampash: I guess it assumes some knowledge about how foreign libs work that could be explained better

adampash15:02:37

Yeah, I mean, I slowly figured it out by digging up some code that used cljsjs in its dependencies. but something like that, and maybe even a link to something that goes deeper into foreign libs would probably go a long way toward helping out beginners like me.

martinklepsch15:02:37

the readme links to this: https://github.com/clojure/clojurescript/wiki/Packaging-Foreign-Dependencies —‚did you read this? (admittedly it's not very specific on usage, so maybe that page is the right spot to improve documentation