diff --git a/docs/framework/react/reference/useQuery.md b/docs/framework/react/reference/useQuery.md index c71ba342ae..5677e92897 100644 --- a/docs/framework/react/reference/useQuery.md +++ b/docs/framework/react/reference/useQuery.md @@ -130,7 +130,7 @@ const { - If set to `false`, the query will not refetch on reconnect. - If set to `"always"`, the query will always refetch on reconnect. - If set to a function, the function will be executed with the query to compute the value -- `notifyOnChangeProps: string[] | "all" | (() => string[] | "all")` +- `notifyOnChangeProps: string[] | "all" | (() => string[] | "all" | undefined)` - Optional - If set, the component will only re-render if any of the listed properties change. - If set to `['data', 'error']` for example, the component will only re-render when the `data` or `error` properties change. diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index 75a130fd7e..4ccde9fd3a 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -161,7 +161,8 @@ export type NetworkMode = 'online' | 'always' | 'offlineFirst' export type NotifyOnChangeProps = | Array | 'all' - | (() => Array | 'all') + | undefined + | (() => Array | 'all' | undefined) export interface QueryOptions< TQueryFnData = unknown,