Skip to content

Commit 525e316

Browse files
authored
docs(reference/QueryCache): use the v5 filters-object form in 'find' and 'findAll' examples (TanStack#10873)
docs(query): use the v5 filters-object form in QueryCache examples
1 parent c2d73d5 commit 525e316

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/reference/QueryCache.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const queryCache = new QueryCache({
2222
},
2323
})
2424

25-
const query = queryCache.find(['posts'])
25+
const query = queryCache.find({ queryKey: ['posts'] })
2626
```
2727

2828
Its available methods are:
@@ -52,7 +52,7 @@ Its available methods are:
5252
> Note: This is not typically needed for most applications, but can come in handy when needing more information about a query in rare scenarios (eg. Looking at the query.state.dataUpdatedAt timestamp to decide whether a query is fresh enough to be used as an initial value)
5353
5454
```tsx
55-
const query = queryCache.find(queryKey)
55+
const query = queryCache.find({ queryKey })
5656
```
5757

5858
**Options**
@@ -71,7 +71,7 @@ const query = queryCache.find(queryKey)
7171
> Note: This is not typically needed for most applications, but can come in handy when needing more information about a query in rare scenarios
7272
7373
```tsx
74-
const queries = queryCache.findAll(queryKey)
74+
const queries = queryCache.findAll({ queryKey })
7575
```
7676

7777
**Options**

0 commit comments

Comments
 (0)