---
title: Refreshing Data
sidebar_label: Refreshing
---

In many cases, we need to periodically update our data so that the user has access to the latest version of what is on
the server. It's very easy, just set the appropriate interval and turn on refreshing.

---

### Example

```tsx
import { useFetch } from "@hyper-fetch/react";
import { DateInterval } from "@hyper-fetch/core";

const { data, error, loading } = useFetch(getPaginatedList, { refresh: true, refreshTime: DateInterval.second * 10 });
```
