-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prevent returning the previous route data on route transition #646
Conversation
63d8664
to
868f3de
Compare
This comment was marked as resolved.
This comment was marked as resolved.
</div> | ||
)) as RouteComponent | ||
RootComponent.preload = vi.fn() | ||
RootComponent.displayName = routeType | ||
return RootComponent | ||
} | ||
|
||
function createLeafRouteComponent(routeType: string): RouteComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From @jacobhq review comment #646 (review)
Looks good, although I don't understand why we need the createLeafRouteComponent function, would you mind explaining?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense having them separate, since passing data creates a weird HTML output that is weird dealing with.
Checklist
Related issue
Fixes #626
Overview