Skip to content

Commit

Permalink
docs: fix the example for queryClient.ensureQueryData (#4572)
Browse files Browse the repository at this point in the history
  • Loading branch information
zorzysty committed Nov 29, 2022
1 parent a1d65df commit e578671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/QueryClient.md
Expand Up @@ -184,7 +184,7 @@ const data = queryClient.getQueryData(queryKey)
`ensureQueryData` is an asynchronous function that can be used to get an existing query's cached data. If the query does not exist, `queryClient.fetchQuery` will be called and its results returned.

```tsx
const data = queryClient.ensureQueryData({ queryKey, queryFn })
const data = await queryClient.ensureQueryData({ queryKey, queryFn })
```

**Options**
Expand Down

0 comments on commit e578671

Please sign in to comment.