Skip to content

Commit

Permalink
docs: remove confusing sentence (#8411)
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo authored Dec 7, 2024
1 parent 665e747 commit 76900b8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions docs/reference/QueryClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ Its available methods are:

If the query exists and the data is not invalidated or older than the given `staleTime`, then the data from the cache will be returned. Otherwise it will try to fetch the latest data.

> The difference between using `fetchQuery` and `setQueryData` is that `fetchQuery` is async and will ensure that duplicate requests for this query are not created with `useQuery` instances for the same query are rendered while the data is fetching.
```tsx
try {
const data = await queryClient.fetchQuery({ queryKey, queryFn })
Expand Down

0 comments on commit 76900b8

Please sign in to comment.