@rahx1t https://github.com/reagent-project/reagent/blob/f1b8590f66dec64a065ec816b53c0b2eb56245bc/doc/ReactFeatures.md#portals 🙂
Hello, we updated Reagent from version 0.8.1 to the newest version and somehow got ourselves a weird problem with our CLJS tests in CI (Linux). We have lein-doo + karma + Chrome setup for the tests and after the update the tests fail with the error
Chrome Headless 79.0.3945.130 (Linux x86_64) ERROR
Uncaught ReferenceError: module$<path_here>$node_modules$object_assign$index is not defined
at target/generated/js-tests/public/test-js/out/react.production.min.js:4:231
ReferenceError: module$<path_here>$node_modules$object_assign$index is not defined
at target/generated/js-tests/public/test-js/out/react.production.min.js:4:231
We use react from cljsjs (as a direct dependency, but same version that comes with Reagent). This does not happen on my machine (mac) - there isn't even that file target/generated/js-tests/public/test-js/out/react.production.min.js
present on my machine. We use cljs compiler options for the karma related things but for nothing else:
:npm-deps {:karma "5.0.1"
:karma-cljs-test "0.1.0"
:karma-chrome-launcher "3.1.0"}
but now I noticed the generated package.json does have react and react-dom in it whereas before they weren't there. Not sure if it is related though. Any ideas where the problem could be? Many different things are present but as the problem happened after Reagent update, I thought I'd ask here first.Well now I set
:install-deps false
for those test npm deps, removed react and react-dom from node_modules and now the tests run just fine. Is Reagent somehow adding react and react-dom to the generated package.json?Is this everything working as intended and me just not understanding how install-deps option works?
Working as intended. Reagent declares npm dependency on React (mostly for Shadow-cljs use) and if you set :install-deps true
those will be installed: https://github.com/reagent-project/reagent/blob/master/src/deps.cljs
hi! what function replace "reagent/render" ?
IIRC reagent.dom/render
. It should be in the deprecation notice.
I'm getting "reagent.core/render is deprecated"
"mount-root" looks like is the new thing.
it's reagent.dom/render
, like p-himik already said
I see, thx!
Is there a table with which versions of React are compatible with which versions of Reagent?