This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-12
Channels
- # admin-announcements (8)
- # alda (11)
- # announcements (53)
- # architecture (2)
- # aws (10)
- # beginners (69)
- # boot (403)
- # braid-chat (160)
- # cider (10)
- # cljs-dev (14)
- # cljsjs (26)
- # cljsrn (34)
- # clojure (223)
- # clojure-art (1)
- # clojure-brasil (4)
- # clojure-dev (10)
- # clojure-france (1)
- # clojure-gamedev (1)
- # clojure-nl (14)
- # clojure-russia (20)
- # clojure-seattle (8)
- # clojure-sg (1)
- # clojurebridge (2)
- # clojurescript (156)
- # code-reviews (2)
- # community-development (305)
- # cursive (5)
- # datavis (33)
- # datomic (38)
- # devcards (4)
- # dirac (39)
- # dunaj (3)
- # emacs (5)
- # events (2)
- # funcool (45)
- # hoplon (3)
- # instaparse (24)
- # jobs (2)
- # ldnclj (77)
- # lein-figwheel (4)
- # leiningen (1)
- # mount (49)
- # nyc (14)
- # off-topic (52)
- # om (125)
- # omnext (4)
- # onyx (13)
- # other-lisps (1)
- # overtone (8)
- # parinfer (31)
- # plastic (6)
- # portland-or (3)
- # quil (4)
- # re-frame (6)
- # reading-clojure (16)
- # reagent (212)
- # ring-swagger (11)
- # robots (5)
- # spacemacs (4)
- # specter (1)
- # yada (26)
So, I’m following the “Using Packages” directions, and I’ve included, react, react-dom, and react-dom-server on my project.clj dependencies.
When I add them all to my :main ns, the require for cljsjs.react works… but I get an error on cljsjs.react-dom
No such namespace: cljsjs.react-dom, could not locate cljsjs/react_dom.cljs, cljsjs/react_dom.cljc, or Closure namespace "cljsjs.react-dom" in file /Users/koba/work/PDC/pdc/cljs/src/pdc/core.cljs {:tag :cljs/analysis-error}
@martinklepsch: any suggestions re ^
the namespace is cljsjs.react.dom
Also, if you are just using Om, you don't need to directly depend on Clsjsjs React, Om already does that and you don't need to require cljsjs namespaces, Om does that too
You should depend and require Cljsjs React when you are directly using React JS methods, e.g. when building React wrapper
Sablono also already depends on them
Ah no, they are set to "provided" scope
yeah, they recently changed: https://github.com/r0man/sablono
but, at this point, I’m trying to get adv. mode compilation going, and I’m wondering about React as an externs file, which led me to cljsjs
Okay, I don't know what's the reason behind this (maybe related to react-with-addons) but then you need to provide the deps in your project.clj
okay, I have those three sablono react deps in my project.clj and I’m requiring them in my :main ns
I don't think you need to require them yourself. That is still done by sablono: https://github.com/r0man/sablono/blob/master/src/sablono/core.cljs#L9-L11
Actually it says “Ŝablono doesn't declare a dependency on React anymore. Use the React dependencies from one of the ClojureScript wrappers or provide the dependencies yourself..."
is there something that should be done to “use the React deps from one of the CLJS wrappers?"
e.g. Om and Reagent already have transitive dependencies to Cljsjs React packages so they will be available in classpath even if you don't provide direct dependencies