expose isValidating

This commit is contained in:
Alex Holliday committed 2026-01-28 18:03:33 +00:00
1 parent fcfad945a0
commit 7a66b5310b
1 file changed
+2 -1
+2 -1
View File
@@ -21,7 +21,7 @@ export const useGet = <T>(
axiosConfig?: AxiosRequestConfig, axiosConfig?: AxiosRequestConfig,
swrConfig?: SWRConfiguration swrConfig?: SWRConfiguration
) => { ) => {
const { data, error, isLoading, mutate } = useSWR<ApiResponse<T>>( const { data, error, isLoading, isValidating, mutate } = useSWR<ApiResponse<T>>(
url, url,
(url: string) => fetcher<T>(url, axiosConfig), (url: string) => fetcher<T>(url, axiosConfig),
swrConfig swrConfig
@@ -30,6 +30,7 @@ export const useGet = <T>(
return { return {
data: data?.data ?? null, data: data?.data ?? null,
isLoading, isLoading,
isValidating,
error, error,
refetch: mutate, refetch: mutate,
}; };