We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cancelRefetch
false
1 parent 430331b commit b600f0eCopy full SHA for b600f0e
src/use-observable-query-fn.ts
@@ -58,7 +58,9 @@ export function useObservableQueryFn<
58
// If we do not invalidate the query, the hook will never re-subscribe,
59
// as data are otherwise marked as fresh.
60
result.cancel = () => {
61
- queryClient.invalidateQueries(queryKey);
+ queryClient.invalidateQueries(queryKey, undefined, {
62
+ cancelRefetch: false,
63
+ });
64
};
65
66
// @todo: Skip subscription for SSR
@@ -82,7 +84,9 @@ export function useObservableQueryFn<
82
84
return of(undefined);
83
85
}),
86
finalize(() => {
87
88
89
90
})
91
)
92
.subscribe();
0 commit comments