Fix typos
This commit is contained in:
@ -9,7 +9,7 @@ Handles asynchronous calls.
|
||||
- Define a reducer function and an initial state for the custom hook's state.
|
||||
- Use the `useReducer()` hook to initialize the `state` variable and the `dispatch` function.
|
||||
- Define an asynchronous `run` function that will run the provided callback, `fn`, while using `dispatch` to update `state` as necessary.
|
||||
- Return an object containting the properties of `state` (`value`, `error` and `loading`) and the `run` function.
|
||||
- Return an object containing the properties of `state` (`value`, `error` and `loading`) and the `run` function.
|
||||
|
||||
```jsx
|
||||
const useAsync = fn => {
|
||||
|
||||
Reference in New Issue
Block a user