From 5608a04a5e8707db6e4c69a541549a370c635f58 Mon Sep 17 00:00:00 2001 From: Minh Nguyen <2852660+NMinhNguyen@users.noreply.github.com> Date: Sat, 13 May 2023 20:11:43 +0100 Subject: [PATCH] docs: deprecate callbacks on `useQuery` (#5407) --- packages/query-core/src/types.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index 6aeca0351f..9426089293 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -204,14 +204,20 @@ export interface QueryObserverOptions< notifyOnChangeProps?: Array | '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 /**