We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef926df commit 1d42e23Copy full SHA for 1d42e23
src/useFetch.ts
@@ -36,7 +36,7 @@ function useFetch<TData = any>(...args: UseFetchArgs): UseFetch<TData> {
36
perPage,
37
cachePolicy, // 'cache-first' by default
38
cacheLife,
39
- suspense,
+ suspense
40
} = customOptions
41
42
const cache = useCache({ persist, cacheLife, cachePolicy })
@@ -196,7 +196,7 @@ function useFetch<TData = any>(...args: UseFetchArgs): UseFetch<TData> {
196
197
// Cancel any running request when unmounting to avoid updating state after component has unmounted
198
// This can happen if a request's promise resolves after component unmounts
199
- useEffect(request.abort, [])
+ useEffect(() => request.abort, [])
200
201
if (suspense && suspender.current) {
202
if (isServer) throw new Error('Suspense on server side is not yet supported! 🙅♂️')
0 commit comments