xxxxxxxxxx
import { useQueryClient } from 'react-query';
const MyComponent = () => {
const queryClient = useQueryClient();
const { data, isLoading } = useQuery('myData', fetchMyData, {
refetchOnWindowFocus: false, // Disable refetching on focus
});
// Your component code
return (
// Your JSX
);
};