0
votes

I'm confused by issue caused by react-router-dom. It can't import matchPath function from react-router. Exception is:

./node_modules/connected-react-router/esm/selectors.js Attempted import error: 'matchPath' is not exported from 'react-router'.

1
there is no such a thing as matchPath in react router. match and history are part of the props passed to component if you have wrapped your app with RoutesAmir-Mousavi

1 Answers

0
votes

matchPath was added to react-router sometime after V3.2.1 and before V4.3.1. Check which version you have with:

npm list react-router

If it's an older (v3) than update it with:

npm update react-router