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
'useRouteMatch' is not exported from 'react-router-dom' #187
Comments
Should we reopen this so that this React Router v6 issue stays in the issues list? React Router v6 is the new default installation target and this is will block new consumers of this library and react router. |
There is already a draft pull request where the problem was mentioned |
Oh good catch. It seems like that has been sitting there for a while now. I hope that gets merged into a new version soon. I'm sure parallel support will be required too. |
Has this been merged? I'm running into this same error with update @okta/okta-react |
@lenichols |
Any progress on this? |
A fix for this was merged #188 |
Would that actually fix the issue? You'd still be calling the Editing to point out that I still get an error when using react-router v6.2.1 in my project along side okta-react v6.4.2.
|
I see the same error, in an app not using The problem is that your ESM bundle contains import * as ReactRouterDom from 'react-router-dom';
[…]
var match = ReactRouterDom.useRouteMatch(routeProps); This is still importing |
I found a really ugly solution for anyone desperate to just get this working: In packages.json in your dependencies, do:
Then in your own code, import like:
|
Patch released in v6.4.3. |
For anyone who's googling this these days: If you have a dev dependency on |
I'm submitting a:
Current behavior
Getting the next error on
npm start
Following the Okta Sign-In Widget and React guide
Packages I use:
The
okta-react.esm.js
code parts:Expected behavior
Compilation without errors
Minimal reproduction of the problem with instructions
Just follow the guide above
Extra information about the use case/user story you are trying to implement
I think the problem is the 6th version of the React Router Dom.
UPD: Found the solution
You should use
useMatch
in place ofuseRouteMatch
Environment
node -v
): 16.11.1Configuration
The text was updated successfully, but these errors were encountered: