From 925f2a26d5e10b0cc0336034ad1716c9994de88a Mon Sep 17 00:00:00 2001 From: Andrew Kenneth MacLeay Date: Wed, 29 Sep 2021 18:37:48 -0400 Subject: [PATCH] Allow fetchData in useGet to return data (so refetch can return data) --- src/useGet.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/useGet.tsx b/src/useGet.tsx index 6c288bc..aaf0a03 100644 --- a/src/useGet.tsx +++ b/src/useGet.tsx @@ -99,7 +99,7 @@ export interface UseGetReturn) => Promise; + refetch: (options?: RefetchOptions) => Promise; } export function useGet( @@ -211,6 +211,7 @@ export function useGet _fetchData(props, context, abort, getAbortSignal)); } + + return; } }, [