React-Router navigates to my resource in an entirely new webpage when I pass a function to useNavigate().navigate's state option

Viewed 23

Code in question:

navigate('add', { state: function() {...} })

When I pass anything other than a function to the state option of the above function, my resource renders properly in its Outlet within the same page "instance"; but in the other case, the resource is loaded, though in an entirely new webpage—discarding the state in the process (it basically mimics the behavior of a traditional anchor link).

Would appreciate any help.

0 Answers
Related