Fork me on GitHub
#cljsjs
<
2016-01-12
>
mudphone09:01:15

So, I’m following the “Using Packages” directions, and I’ve included, react, react-dom, and react-dom-server on my project.clj dependencies.

mudphone09:01:39

When I add them all to my :main ns, the require for cljsjs.react works… but I get an error on cljsjs.react-dom

mudphone09:01:58

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}

meow09:01:20

@martinklepsch: any suggestions re ^

mudphone09:01:52

same goes for cljsjs.react-dom-server

mudphone09:01:12

I’m trying to get an advanced mode compilation build going

juhoteperi09:01:21

the namespace is cljsjs.react.dom

mudphone09:01:42

oh man, sorry

juhoteperi09:01:32

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

juhoteperi09:01:48

You should depend and require Cljsjs React when you are directly using React JS methods, e.g. when building React wrapper

mudphone09:01:45

hmm, okay, makes sense… but, doesn’t sablono require those three libs?

mudphone09:01:57

that’s why I had them in my dependencies

juhoteperi09:01:26

Sablono also already depends on them

juhoteperi09:01:43

Ah no, they are set to "provided" scope

mudphone09:01:20

in the readme, under deps

mudphone09:01:02

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

juhoteperi09:01:17

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

mudphone09:01:18

okay, I have those three sablono react deps in my project.clj and I’m requiring them in my :main ns

juhoteperi09:01:43

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

mudphone09:01:54

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..."

mudphone09:01:59

yeah, so I probably don’t need them

mudphone09:01:15

hmmm… i tried removing them before and had problems… let me go through that again

mudphone09:01:40

is there something that should be done to “use the React deps from one of the CLJS wrappers?"

juhoteperi09:01:31

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