Skip to content

Commit 07cbfe1

Browse files
refactor(react-query): exchange react-query noop to query-core noop (#9122)
* refactor: exchange react-query noop to query-core noop * ci: apply automated fixes * fix: resolve import error --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent cb40661 commit 07cbfe1

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

packages/query-core/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export {
2121
matchMutation,
2222
keepPreviousData,
2323
skipToken,
24+
noop,
2425
shouldThrowError,
2526
} from './utils'
2627
export type { MutationFilters, QueryFilters, Updater, SkipToken } from './utils'

packages/react-query/src/useBaseQuery.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22
import * as React from 'react'
33

4-
import { isServer, notifyManager } from '@tanstack/query-core'
4+
import { isServer, noop, notifyManager } from '@tanstack/query-core'
55
import { useQueryClient } from './QueryClientProvider'
66
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'
77
import {
@@ -16,7 +16,6 @@ import {
1616
shouldSuspend,
1717
willFetch,
1818
} from './suspense'
19-
import { noop } from './utils'
2019
import type {
2120
QueryClient,
2221
QueryKey,

packages/react-query/src/useMutation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import * as React from 'react'
33
import {
44
MutationObserver,
5+
noop,
56
notifyManager,
67
shouldThrowError,
78
} from '@tanstack/query-core'
89
import { useQueryClient } from './QueryClientProvider'
9-
import { noop } from './utils'
1010
import type {
1111
UseMutateFunction,
1212
UseMutationOptions,

packages/react-query/src/useQueries.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as React from 'react'
44
import {
55
QueriesObserver,
66
QueryObserver,
7+
noop,
78
notifyManager,
89
} from '@tanstack/query-core'
910
import { useQueryClient } from './QueryClientProvider'
@@ -20,7 +21,6 @@ import {
2021
shouldSuspend,
2122
willFetch,
2223
} from './suspense'
23-
import { noop } from './utils'
2424
import type {
2525
DefinedUseQueryResult,
2626
UseQueryOptions,

packages/react-query/src/utils.ts

-1
This file was deleted.

0 commit comments

Comments
 (0)