T
TanStack4mo ago
absent-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
foreign-sapphire
foreign-sapphire4mo ago
Good catch, we're going to look into it.
genetic-orange
genetic-orange3mo ago
This should be resolved in 1.131.31
absent-sapphire
absent-sapphireOP3mo ago
you are the best guys, thanks

Did you find this page helpful?