Skip to main content
Version: 3.x.x

Refreshing Data

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

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

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