Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sahilmob committed May 21, 2022
1 parent 0b0db99 commit 06d4128
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/src/pages/reference/useQuery.md
Expand Up @@ -25,6 +25,7 @@ const {
isSuccess,
refetch,
remove,
update,
status,
} = useQuery(queryKey, queryFn?, {
cacheTime,
Expand Down Expand Up @@ -246,3 +247,7 @@ const result = useQuery({
- If `cancelRefetch` is `true`, then the current request will be cancelled before a new request is made
- `remove: () => void`
- A function to remove the query from the cache.
- `update: (updater: TData | (oldData: TData | undefined) => TData) => void`
- A convenience function to optimistically update the query.
- It calls [`queryClient.setQueryData`](../reference/QueryClient#queryclientsetquerydata) internally with the key that was provided to the `useQuery` hook
- If its called without providing a query key to the `useQuery` hook, it will throw a warning in the console

0 comments on commit 06d4128

Please sign in to comment.