I\'m trying to set up react-router in an example application, and I\'m getting the following error:
You should not use outside a
I was getting this error because I was importing a reusable component from an npm library and the versions of react-router-dom did not match.
react-router-dom
So make sure you use the same version in both places!