Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions packages/query-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
matchMutation,
keepPreviousData,
skipToken,
noop,
} from './utils'
export type { MutationFilters, QueryFilters, Updater, SkipToken } from './utils'
export { isCancelledError } from './retryer'
Expand Down
3 changes: 1 addition & 2 deletions packages/react-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'
import * as React from 'react'

import { isServer, notifyManager } from '@tanstack/query-core'
import { isServer, noop, notifyManager } from '@tanstack/query-core'
import { useQueryClient } from './QueryClientProvider'
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'
import {
Expand All @@ -16,7 +16,6 @@ import {
shouldSuspend,
willFetch,
} from './suspense'
import { noop } from './utils'
import type {
QueryClient,
QueryKey,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query/src/useMutation.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client'
import * as React from 'react'
import { MutationObserver, notifyManager } from '@tanstack/query-core'
import { MutationObserver, noop, notifyManager } from '@tanstack/query-core'
import { useQueryClient } from './QueryClientProvider'
import { noop, shouldThrowError } from './utils'
import { shouldThrowError } from './utils'
import type {
UseMutateFunction,
UseMutationOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/useQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as React from 'react'
import {
QueriesObserver,
QueryObserver,
noop,
notifyManager,
} from '@tanstack/query-core'
import { useQueryClient } from './QueryClientProvider'
Expand All @@ -20,7 +21,6 @@ import {
shouldSuspend,
willFetch,
} from './suspense'
import { noop } from './utils'
import type {
DefinedUseQueryResult,
UseQueryOptions,
Expand Down
2 changes: 0 additions & 2 deletions packages/react-query/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ export function shouldThrowError<T extends (...args: Array<any>) => boolean>(

return !!throwError
}

export function noop(): void {}
Loading