Skip to content

useNavigate().navigate throws an error in the browser console when called #12984

@DiRover

Description

@DiRover

I'm using React Router as a...

library

Reproduction

I have created a simple application with three components for demonstration problem
https://github.com/DiRover/RR7-navigate-error.git

System Info

MacOS
Chrome
react 19
react-router 7.1.5
vite 6.1.0

Used Package Manager

pnpm

Expected Behavior

There should be no error in the browser console

Actual Behavior

There should be no error in the browser console when executing the navigate method.

Error in the browser console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'result')

Image

I don’t understand what is causing this error, I only noticed that it occurs when SecondComponent has a loader in the route tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions