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 Routes
– Amir-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
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
matchPath
in react router.match
andhistory
are part of the props passed to component if you have wrapped your app with Routes – Amir-Mousavi