Skip to content

Commit

Permalink
docs: deprecate callbacks on useQuery (#5407)
Browse files Browse the repository at this point in the history
  • Loading branch information
NMinhNguyen authored May 13, 2023
1 parent 8d13ad8 commit 5608a04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/query-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@ export interface QueryObserverOptions<
notifyOnChangeProps?: Array<keyof InfiniteQueryObserverResult> | 'all'
/**
* This callback will fire any time the query successfully fetches new data.
*
* @deprecated This callback will be removed in the next major version.
*/
onSuccess?: (data: TData) => void
/**
* This callback will fire if the query encounters an error and will be passed the error.
*
* @deprecated This callback will be removed in the next major version.
*/
onError?: (err: TError) => void
/**
* This callback will fire any time the query is either successfully fetched or errors and be passed either the data or error.
*
* @deprecated This callback will be removed in the next major version.
*/
onSettled?: (data: TData | undefined, error: TError | null) => void
/**
Expand Down

0 comments on commit 5608a04

Please sign in to comment.