We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
useSWRHandler
1 parent ee11874 commit f98f715Copy full SHA for f98f715
src/index/use-swr.ts
@@ -729,7 +729,7 @@ export const useSWRHandler = <Data = any, Error = any>(
729
}
730
731
732
- return {
+ const swrResponse: SWRResponse<Data, Error> = {
733
mutate: boundMutate,
734
get data() {
735
stateDependencies.data = true
@@ -747,7 +747,8 @@ export const useSWRHandler = <Data = any, Error = any>(
747
stateDependencies.isLoading = true
748
return isLoading
749
750
- } as SWRResponse<Data, Error>
+ }
751
+ return swrResponse
752
753
754
export const SWRConfig = OBJECT.defineProperty(ConfigProvider, 'defaultValue', {
0 commit comments