How to refetch data in React Query in an action handler only when the data is stale? – Html
I know the regular refetching of the data in useQuery const fetchData = async()=>{...} // it starts fetching data from backend with this line of code const {status, data, error, refetch } = useQuery( myKey, fetchData(), { enabled: false, }…