Open devtyty opened 6 months ago
I'd like to add this eventually, but in the meantime you can get the same thing with useEffect
:
const { query } = useEffect(store.query);
useEffect(() => {
const id = setInterval(() => {
query.invalidate()
}, 5000);
return () => {
clearInterval(id);
}:
}, [query]);
I'd like to add this eventually, but in the meantime you can get the same thing with
useEffect
:const { query } = useEffect(store.query); useEffect(() => { const id = setInterval(() => { query.invalidate() }, 5000); return () => { clearInterval(id); }: }, [query]);
Yah! me too. But i think own lib should support for this to avoid boilerplate code
Can you add more interval fetch for query?