Skip to content

Commit 802a288

Browse files
authored
docs: deprecate callbacks on useQuery (#5353)
* docs: deprecate callbacks on useQuery * docs: recommend the eslint plugin on installation page
1 parent 2552c4b commit 802a288

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/react/installation.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,15 @@ opera >= 53
4747
```
4848

4949
> Depending on your environment, you might need to add polyfills. If you want to support older browsers, you need to transpile the library from `node_modules` yourselves.
50+
51+
### Recommendations
52+
53+
It is recommended to also use our [ESLint Plugin Query](./eslint/eslint-plugin-query) to help you catch bugs and inconsistencies while you code. You can install it via:
54+
55+
```bash
56+
$ npm i -D @tanstack/eslint-plugin-query
57+
# or
58+
$ pnpm add -D @tanstack/eslint-plugin-query
59+
# or
60+
$ yarn add -D @tanstack/eslint-plugin-query
61+
```

docs/react/reference/useQuery.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,15 @@ const {
137137
- If set to `"all"`, the component will opt-out of smart tracking and re-render whenever a query is updated.
138138
- By default, access to properties will be tracked, and the component will only re-render when one of the tracked properties change.
139139
- `onSuccess: (data: TData) => void`
140+
- **Deprecated** - this callback will be removed in the next major version
140141
- Optional
141142
- This function will fire any time the query successfully fetches new data.
142143
- `onError: (error: TError) => void`
144+
- **Deprecated** - this callback will be removed in the next major version
143145
- Optional
144146
- This function will fire if the query encounters an error and will be passed the error.
145147
- `onSettled: (data?: TData, error?: TError) => void`
148+
- **Deprecated** - this callback will be removed in the next major version
146149
- Optional
147150
- This function will fire any time the query is either successfully fetched or errors and be passed either the data or error.
148151
- `select: (data: TData) => unknown`

0 commit comments

Comments
 (0)