T
TanStack2mo ago
conscious-sapphire

Reference of `navigate` now changes before navigation. Is this intended?

Since version 1.131.28 (latest as of now) if you have this kind of code:
function RouteComponent() {
const navigate = Route.useNavigate()

useEffect(() => {
console.log('navigate changed')
}, [navigate])
}
function RouteComponent() {
const navigate = Route.useNavigate()

useEffect(() => {
console.log('navigate changed')
}, [navigate])
}
the effect also triggers when you navigate away just before the navigation happens. This was not the case before. I assume this is the side effect of this PR. Is this intended? Is this how it's gonna stay?
3 Replies
unwilling-turquoise
unwilling-turquoise2mo ago
Good catch, we're going to look into it.
optimistic-gold
optimistic-gold2mo ago
This should be resolved in 1.131.31
conscious-sapphire
conscious-sapphireOP2mo ago
you are the best guys, thanks

Did you find this page helpful?