TanStackT
TanStack2y ago
39 replies
wet-aqua

Same url navigation behavior

Router method navigate checks parsed location's href with a previous and if they match navigation does not perform.

Let's consider the example:
router.navigate({
  to: location.pathname,
  mask: {to: '/settings'},
  state: {id: 5},
});


In this case we use mask and state attributes, that differs with previous route match, but href of next and previous matches are same => navigation does not happen. Is it expected behavior?

I need to force navigation and I can achieve it with random search parameter, but may be more suitable approach exists?
Was this page helpful?