Fork me on GitHub
#reagent
<
2020-12-05
>
GGfpc16:12:08

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]

GGfpc16:12:29

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

p-himik16:12:19

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

GGfpc17:12:09

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

GGfpc17:12:22

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-himik17:12:02

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

GGfpc17:12:00

Okay, thanks for the help!