Skip to content

Commit

Permalink
feat: do not refresh by default outside of components
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jan 10, 2024
1 parent c637a78 commit b6e45fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/use-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export interface UseQueryOptions<TResult = unknown> {
gcTime?: number

initialData?: () => TResult
// TODO: rename to refresh and use refresh instead by default?
// TODO: rename to refresh since that's the default? and change 'always' to 'force'?
refetchOnMount?: _RefetchOnControl
refetchOnWindowFocus?: _RefetchOnControl
refetchOnReconnect?: _RefetchOnControl
Expand Down Expand Up @@ -166,7 +166,6 @@ export function useQuery<TResult, TError = Error>(
})
} else {
isActive = true
refresh()
}

watch(entry, (entry, _, onCleanup) => {
Expand Down

0 comments on commit b6e45fb

Please sign in to comment.