mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 16:33:51 +00:00
improve: stop list rerender
react-query would trigger re-render on refetch even when using cache
This commit is contained in:
@@ -5,6 +5,7 @@ export const useFetch = (namespace, fn) => {
|
||||
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
||||
refetchInterval: refetchIntervalMs,
|
||||
cacheTime: Infinity,
|
||||
notifyOnChangeProps: 'tracked',
|
||||
});
|
||||
|
||||
return { data, status, isError, refetch };
|
||||
|
||||
Reference in New Issue
Block a user