You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
React: 16.14.0
ReactDOM/React Native: 16.14.0
Redux: 4.1.2
React Redux: 7.2.6
What is the current behavior?
while installing react-redux without react-dom make the usage of the UMD impossible.
The UMD needs react-dom aka ReactDOM global setup.
Our build toolchain leverage the peerDependencies field of the package.json of react-redux and because it is badly setup it do not see the dependencies between both.
In the end we have :
Uncaught TypeError: reactDom is undefined
because our toolchain place reactdom script tag way after react-redux.
Looking at the code inside the UMD shows you have to provide react-dom to make it work.
Please add react-dom and react-native as peerDependencies in the package.json 🙏
It would let the user choose between both and our toolchain able to understand react-dom is a peerDependencies.
I will be able to push the PR later on this week I think.
Which browser and OS are affected by this issue?
all
Did this work in previous versions of React Redux?
Yes
The text was updated successfully, but these errors were encountered:
The main result is we can't put them into peerDeps yet because many people still use older versions of npm (or other installers) that don't support peerDepsMeta and cause lots of warnings for them. This is the best solution for now.
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
What is the current behavior?
while installing react-redux without react-dom make the usage of the UMD impossible.
The UMD needs react-dom aka ReactDOM global setup.
Our build toolchain leverage the peerDependencies field of the package.json of react-redux and because it is badly setup it do not see the dependencies between both.
In the end we have :
because our toolchain place reactdom script tag way after react-redux.
Looking at the code inside the UMD shows you have to provide react-dom to make it work.
https://unpkg.com/browse/[email protected]/dist/react-redux.js
there is not conditional on reactDom is here.
peerDependencies
Reading official docs https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependenciesmeta show peerDependenciesMeta field should be used for declared peerDependencies.
https://unpkg.com/browse/[email protected]/package.json
We can see react-dom is only in peerDependenciesMeta.
What is the expected behavior?
Please add react-dom and react-native as peerDependencies in the package.json 🙏
It would let the user choose between both and our toolchain able to understand react-dom is a peerDependencies.
I will be able to push the PR later on this week I think.
Which browser and OS are affected by this issue?
all
Did this work in previous versions of React Redux?
The text was updated successfully, but these errors were encountered: