0.3.21
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { api } from '../api/client';
|
||||
import { subscribeToRecovery } from './availability';
|
||||
|
||||
/* The two hooks every page is built from.
|
||||
*
|
||||
@@ -77,6 +78,8 @@ export function useQuery<T>(path: string, options: QueryOptions = {}): Loadable<
|
||||
};
|
||||
}, [run]);
|
||||
|
||||
useEffect(() => subscribeToRecovery(() => void run()), [run]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!pollMs || !enabled) return;
|
||||
let timer: number | undefined;
|
||||
|
||||
Reference in New Issue
Block a user