Clarification for execution order of route onEnter
and onLeave
#2681
Replies: 1 comment 1 reply
-
can you provide a complete minimal example to debug this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am hoping to get some clarification on the exact order and conditions for
onEnter
,onStay
, andonLeave
in thecreateFileRoute
methods, specifically:Are there any guarantees about their execution order?
Specifically, in our app, we observed that in the case of transitioning to the same route with different parameters,
onEnter
appears to be called beforeonLeave
, which seems counterintuitive to the method descriptions. Is this the intended behavior?https://tanstack.com/router/latest/docs/framework/react/api/router/RouteOptionsType#onleave-property
Beta Was this translation helpful? Give feedback.
All reactions