---
title: useRevalidator
new: true
---
# `useRevalidator`
This hook allows you to revalidate the data for any reason. React Router automatically revalidates the data after actions are called, but you may want to revalidate for other reasons like when focus returns to the window.
This feature only works if using a data router, see [Picking a Router][pickingarouter]
```tsx
import { useRevalidator } from "react-router-dom";
function WindowFocusRevalidator() {
let revalidator = useRevalidator();
useFakeWindowFocus(() => {
revalidator.revalidate();
});
return (
Revalidating...
);
}
```
Again, React Router already revalidates the data on the page automatically in the vast majority of cases so this should rarely be needed. If you find yourself using this for normal CRUD operations on your data in response to user interactions, you're probably not taking advantage of the other APIs like [`