sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

Uncaught TypeError: (0 , _reactRouterDom.useNavigate) is not a function at LinkContainer

Open alxthm opened this issue 3 years ago • 0 comments

Doing the tutorial, I had trouble adding links to the navbar. The command

npm install react-router-bootstrap

currently installs v0.26.0, which added support for React Router v6. This is not compatible with the specified version of "react-router-dom": "^5.2.0" in the tutorial, which uses the old useHistory function instead of useNavigate.

I was able to fix the issue by running

npm install [email protected] --save

in the frontend folder, to match the version in the tutorial repository.

Maybe we should mention this in the tutorial ?

alxthm avatar Dec 26 '21 15:12 alxthm