Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: deprecate callbacks on useQuery #5353

Merged
merged 2 commits into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/react/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,15 @@ opera >= 53
```

> 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.
### Recommendations

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:

```bash
$ npm i -D @tanstack/eslint-plugin-query
# or
$ pnpm add -D @tanstack/eslint-plugin-query
# or
$ yarn add -D @tanstack/eslint-plugin-query
```
3 changes: 3 additions & 0 deletions docs/react/reference/useQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,15 @@ const {
- If set to `"all"`, the component will opt-out of smart tracking and re-render whenever a query is updated.
- By default, access to properties will be tracked, and the component will only re-render when one of the tracked properties change.
- `onSuccess: (data: TData) => void`
- **Deprecated** - this callback will be removed in the next major version
- Optional
- This function will fire any time the query successfully fetches new data.
- `onError: (error: TError) => void`
- **Deprecated** - this callback will be removed in the next major version
- Optional
- This function will fire if the query encounters an error and will be passed the error.
- `onSettled: (data?: TData, error?: TError) => void`
- **Deprecated** - this callback will be removed in the next major version
- Optional
- This function will fire any time the query is either successfully fetched or errors and be passed either the data or error.
- `select: (data: TData) => unknown`
Expand Down