reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
GGfpc 2020-12-05T16:52:08.343400Z

Hello! Do I need to add this exclusion to the reagent dependency if I want to use npm dependencies? I've read that cljsjs doesn't play along with npm

:exclusions [cljsjs/react cljsjs/react-dom]

GGfpc 2020-12-05T16:53:29.343500Z

The thing is, when I do add the exclusion I get errors like this: goog.require could not find: react_dom

p-himik 2020-12-05T16:59:19.343700Z

If you're using shadow-cljs then no, you just have to install React via NPM.

GGfpc 2020-12-05T17:02:09.343900Z

I'm using figwheel which seems to also support NPM packages https://figwheel.org/docs/npm

GGfpc 2020-12-05T17:12:22.344200Z

I'm mainly asking this because after I added npm dependencies I can no longer use reagent

Uncaught TypeError: Cannot read property 'render' of undefined
    at reagent$dom$render_comp (dom.cljs:20)
    at Function.cljs$core$IFn$_invoke$arity$3 (dom.cljs:50)
    at reagent$dom$render (dom.cljs:29)
    at Function.cljs$core$IFn$_invoke$arity$2 (dom.cljs:29)
    at reagent$dom$render (dom.cljs:29)
    at goodstats$index$init_BANG_ (index.cljs:36)
    at index.cljs:38

p-himik 2020-12-05T17:15:02.344400Z

Sorry, no idea - might be worth asking in #figwheel because it's specific to NPM and cljsjs packages, not Reagent.

GGfpc 2020-12-05T17:22:00.344600Z

Okay, thanks for the help!