Parameters
queryProps: {
cacheTime?: number;
enabled?: boolean;
keepPreviousData?: boolean;
refetchInterval?: number;
refetchOnMount?: boolean;
refetchOnReconnect?: boolean;
refetchOnWindowFocus?: boolean;
staleTime?: number;
}
Optional
cacheTime?: number
Optional
enabled?: boolean
Optional
keepPreviousData?: boolean
Optional
refetchInterval?: number
Optional
refetchOnMount?: boolean
Optional
refetchOnReconnect?: boolean
Optional
refetchOnWindowFocus?: boolean
Optional
staleTime?: number
Returns {
dataUpdatedAt: number;
error: ConnectError;
errorUpdateCount: number;
errorUpdatedAt: number;
failureCount: number;
failureReason: null | ConnectError;
fetchStatus: FetchStatus;
isError: true;
isFetched: boolean;
isFetchedAfterMount: boolean;
isFetching: boolean;
isGeofenced: undefined | BoolValue;
isInitialLoading: boolean;
isLoading: false;
isLoadingError: false;
isPaused: boolean;
isPlaceholderData: boolean;
isPreviousData: boolean;
isRefetchError: true;
isRefetching: boolean;
isStale: boolean;
isSuccess: false;
refetch: (<TPageData>(options?) => Promise<QueryObserverResult<BoolValue, ConnectError>>);
remove: (() => void);
status: "error";
} | {
dataUpdatedAt: number;
error: null;
errorUpdateCount: number;
errorUpdatedAt: number;
failureCount: number;
failureReason: null | ConnectError;
fetchStatus: FetchStatus;
isError: false;
isFetched: boolean;
isFetchedAfterMount: boolean;
isFetching: boolean;
isGeofenced: undefined | BoolValue;
isInitialLoading: boolean;
isLoading: false;
isLoadingError: false;
isPaused: boolean;
isPlaceholderData: boolean;
isPreviousData: boolean;
isRefetchError: false;
isRefetching: boolean;
isStale: boolean;
isSuccess: true;
refetch: (<TPageData>(options?) => Promise<QueryObserverResult<BoolValue, ConnectError>>);
remove: (() => void);
status: "success";
} | {
dataUpdatedAt: number;
error: ConnectError;
errorUpdateCount: number;
errorUpdatedAt: number;
failureCount: number;
failureReason: null | ConnectError;
fetchStatus: FetchStatus;
isError: true;
isFetched: boolean;
isFetchedAfterMount: boolean;
isFetching: boolean;
isGeofenced: undefined | BoolValue;
isInitialLoading: boolean;
isLoading: false;
isLoadingError: true;
isPaused: boolean;
isPlaceholderData: boolean;
isPreviousData: boolean;
isRefetchError: false;
isRefetching: boolean;
isStale: boolean;
isSuccess: false;
refetch: (<TPageData>(options?) => Promise<QueryObserverResult<BoolValue, ConnectError>>);
remove: (() => void);
status: "error";
} | {
dataUpdatedAt: number;
error: null;
errorUpdateCount: number;
errorUpdatedAt: number;
failureCount: number;
failureReason: null | ConnectError;
fetchStatus: FetchStatus;
isError: false;
isFetched: boolean;
isFetchedAfterMount: boolean;
isFetching: boolean;
isGeofenced: undefined | BoolValue;
isInitialLoading: boolean;
isLoading: true;
isLoadingError: false;
isPaused: boolean;
isPlaceholderData: boolean;
isPreviousData: boolean;
isRefetchError: false;
isRefetching: boolean;
isStale: boolean;
isSuccess: false;
refetch: (<TPageData>(options?) => Promise<QueryObserverResult<BoolValue, ConnectError>>);
remove: (() => void);
status: "loading";
}
An object containing the a boolean isGeofenced
and the rest of useQuery's return.
Custom wrapper hook that retrieves geofencing information.
All params are optional.