sst / sst.dev

Repo for sst.dev

Home Page:https://sst.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

alxthm opened this issue · 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 react-router-bootstrap@0.25.0 --save

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

Maybe we should mention this in the tutorial ?