diff --git a/docs/useAsyncFn.md b/docs/useAsyncFn.md index 94cc243e..bf86788d 100644 --- a/docs/useAsyncFn.md +++ b/docs/useAsyncFn.md @@ -9,7 +9,7 @@ function that returns a promise. The state is of the same shape as `useAsync`. import {useAsyncFn} from 'react-use'; const Demo = ({url}) => { - const [state, fetch] = useAsyncFn(async () => { + const [state, doFetch] = useAsyncFn(async () => { const response = await fetch(url); const result = await response.text(); return result @@ -23,7 +23,7 @@ const Demo = ({url}) => { ?
Error: {state.error.message}
:
Value: {state.value}
} - + ); };