improve: stop list rerender

react-query would trigger re-render on refetch even when using cache
This commit is contained in:
cv
2021-05-26 20:44:09 +02:00
parent 9c55116053
commit 0a2be1615e
+1
View File
@@ -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 };