T
TanStack8mo ago
absent-sapphire

How to refetch/invalidate router data?

I want to revalidate router data after an API change, There is any way I can easily force the router loader to refetch the data and the child components to updated using the useRouterData?
2 Replies
ambitious-aqua
ambitious-aqua8mo ago
const router = useRouter(); router.invalidate();
absent-sapphire
absent-sapphireOP8mo ago
@aurindo neto thanks it worked, therefore tanstack router is scrolling it to the top once we call it

Did you find this page helpful?