Replies: 1 comment 8 replies
-
any ideas would be welcome |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly thanks for the wonderful library. I am having a hard time getting the query to fetch on demand. Here is my query
const { isLoading, data, fetchNextPage } = useInfiniteQuery('feed', nonProfitApi.fetchFeed, { getNextPageParam: () => { return pageNo; }, refetchInterval: 10000, });
and here is how i m try to force a refetch (unsuccessfully)
useEffect(() => { return () => { if (isRefreshing) { qc.invalidateQueries('feed').then(res => setPageNo(1)); } }; }, [isRefreshing, qc]);
Beta Was this translation helpful? Give feedback.
All reactions