-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 17 support #7695
Comments
requesting |
Yeah, there's nothing preventing you from installing React 17 and using that. I've got it in place in our production app right now and it works A-OK. Something is wrong with your installation tooling if it's resolving a different version of React. Router shouldn't have it's own React module under any version of React, as many of the internal instances React uses are going to mismatch and cause issues. |
I've encountered the same problem while using "peerDependencies": {
"react": ">=15"
}, Which does not exclude v17. |
This issue suggested that was the source of problem remix-run/react-router#7695
It works, but duplicate "react-is" module versions are loaded and bundled, both v16 and v17 (correctly as this is what the react-router specifies in it's package.json). I don't see how the current package.json would allow react v17 (this is true for both v5 and v6) |
does it have any solution to leave host app with react v17 and not have 2 versions of react in the bundle? |
Version
Test Case
https://codesandbox.io/s/react-router-forked-zeizl?file=/index.js
which does actually work, but the exact same example does not locally
Steps to reproduce
yarn install
these packagesuseParams
)you'll get an error
Invalid hook call
because
[email protected]
is resolved and installed innode_modules/react-router-dom/node_modules
instead of using the root[email protected]
node_modules/react-router-dom/node_modules/react
or
alias
key in react-scriptwebpack.config
like soreact: path.resolve('node_modules/react'),
solves the issue
Expected Behavior
react-router-dom has
which should allow
[email protected]
resolution ?Actual Behavior
We should be able to use
react-router-dom
hookuseParams
without having invalid hook call with react 17The text was updated successfully, but these errors were encountered: