We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e4a340 commit c48a77fCopy full SHA for c48a77f
packages/vue-query/src/useMutationState.ts
@@ -71,12 +71,9 @@ export function useMutationState<TResult = MutationState>(
71
): Readonly<Ref<Array<TResult>>> {
72
const filters = computed(() => cloneDeepUnref(options.filters))
73
const mutationCache = (queryClient || useQueryClient()).getMutationCache()
74
- const state = shallowRef(getResult(mutationCache, options)) as Ref<
75
- Array<TResult>
76
- >
+ const state = shallowRef(getResult(mutationCache, options))
77
const unsubscribe = mutationCache.subscribe(() => {
78
- const result = getResult(mutationCache, options)
79
- state.value = result
+ state.value = getResult(mutationCache, options)
80
})
81
82
watch(filters, () => {
0 commit comments