T
TanStack16mo ago
sunny-green

navigate does not trigger new page

Hi, I have a dropdown that should only change a specific param within the url. However, although it reaches the if branch and the $gameServerId is different, the navigate does not result in a new page being loaded. Any ideas?
const params = matchRoute({
to: '/gameserver/$gameServerId',
fuzzy: true,
}) as { gameServerId: string; '**': string } | false;

if (params !== false) {
navigate({
to: `/gameserver/$gameServerId/${params['**']}`,
params: {
gameServerId: params.gameServerId,
},
startTransition: true,
});
}
const params = matchRoute({
to: '/gameserver/$gameServerId',
fuzzy: true,
}) as { gameServerId: string; '**': string } | false;

if (params !== false) {
navigate({
to: `/gameserver/$gameServerId/${params['**']}`,
params: {
gameServerId: params.gameServerId,
},
startTransition: true,
});
}
1 Reply
vicious-gold
vicious-gold16mo ago
please show a minimal reproduction by forking one of our examples

Did you find this page helpful?