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
This isn't actually an issue with React-Redux itself as far as I know.
Up through v7, the React-Redux types have been maintained by the community in DefinitelyTyped, in the @types/react-redux package.
React-Redux v7.x has a hard dependency on @types/react-redux@^7, in order to ensure that our TS users automatically get the types.
However, DefinitelyTyped apparently automatically adds a dependency like "@types/react": "*" to any package that imports from @types/react. So, the real issue here is how DT constructs its packages.
One option here is to specifically tell your package manager what version of @types/react to resolve to, and enforce that across your project:
The other is to upgrade to React-Redux v8, which is currently in RC and will be released live in the next few days. It's already written in TS, so we don't have a dependency on @types/react-redux any more, and it should work with whatever version of @types/react is already installed
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
What is the current behavior?
react-redux 7.2.6 installs @types/react@18
What is the expected behavior?
I expect that react-redux doesn't install @types/react@18. When @types/react@18 installed, our components' types goes crazy.
Which browser and OS are affected by this issue?
Ubuntu 20.4
Did this work in previous versions of React Redux?
The text was updated successfully, but these errors were encountered: