This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-14
Channels
- # 100-days-of-code (4)
- # announcements (1)
- # beginners (63)
- # boot (22)
- # braveandtrue (104)
- # calva (3)
- # cider (12)
- # cljs-dev (53)
- # cljsjs (3)
- # cljsrn (1)
- # clojure (180)
- # clojure-dev (14)
- # clojure-italy (4)
- # clojure-nl (11)
- # clojure-spec (15)
- # clojure-uk (60)
- # clojure-ukraine (1)
- # clojurescript (118)
- # clojutre (3)
- # core-async (12)
- # core-logic (17)
- # cursive (19)
- # datomic (45)
- # devcards (4)
- # emacs (7)
- # figwheel-main (218)
- # fulcro (27)
- # funcool (3)
- # graphql (1)
- # jobs (4)
- # leiningen (57)
- # off-topic (71)
- # pedestal (2)
- # portkey (17)
- # re-frame (5)
- # reitit (4)
- # remote-jobs (2)
- # ring (11)
- # rum (2)
- # shadow-cljs (14)
- # specter (11)
- # sql (34)
- # tools-deps (23)
@ghiden there is not much to it. (:require ["create-react-class" :as crc])
(def MyComponent (crc #js {:render (fn [] (this-as this ...))}))
what would be a reason when I do "release", I get an error from "reagent" saying "js/React is missing". This is :target :npm-module
and :runtime :browser
. And I get this error from the consumer of this published npm module.
@ghiden globals work differently in node
and the way reagent
uses the React
global won't work there. Didn't reagent switch to a proper require a while ago? are you on an ancient version?
it might work if you do (js/goog.exportSymbol "React" react js/global)
when (:require ["react" :as react])
Yes. I'm using an old version 0.7.0 due to some dependencies restrictions. This doesn't seem to work. But I just tried 0.8.1 and it works.
Since we're talking about using React
from shadow-cljs
can I ask a naive question? Is pulling in a third-party React component as simple as npm install react-super-cool-component
and then (require ["react-super-cool-component" :as rscc])
?