Skip to content

Commit

Permalink
Merge remote-tracking branch 'react-query/master' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo committed Jan 23, 2022
2 parents 4afd0c3 + 6710bc1 commit d4b6afc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/src/pages/reference/useIsMutating.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const isMutatingPosts = useIsMutating(['posts'])

**Options**

- `mutationKey?: string | unknown[]`
- `filters?: MutationFilters`: [Mutation Filters](../guides/filters#mutation-filters)

**Returns**
Expand Down
10 changes: 5 additions & 5 deletions src/reactjs/useIsMutating.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from 'react'

import { notifyManager } from '../core/notifyManager'
import { QueryKey } from '../core/types'
import { MutationKey } from '../core/types'
import { MutationFilters, parseMutationFilterArgs } from '../core/utils'
import { useQueryClient } from './QueryClientProvider'

export function useIsMutating(filters?: MutationFilters): number
export function useIsMutating(
queryKey?: QueryKey,
filters?: MutationFilters
mutationKey?: MutationKey,
filters?: Omit<MutationFilters, 'mutationKey'>
): number
export function useIsMutating(
arg1?: QueryKey | MutationFilters,
arg2?: MutationFilters
arg1?: MutationKey | MutationFilters,
arg2?: Omit<MutationFilters, 'mutationKey'>
): number {
const mountedRef = React.useRef(false)
const filters = parseMutationFilterArgs(arg1, arg2)
Expand Down

0 comments on commit d4b6afc

Please sign in to comment.