Skip to content

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

@alxthm

Description

@alxthm

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions