Correct typo
This commit is contained in:
committed by
GitHub
parent
1963c8cd4a
commit
ffa3272082
@ -8,7 +8,7 @@ A hook that implements `setTimeout` in a declarative manner.
|
|||||||
- Create a custom hook that takes a `callback` and a `delay`.
|
- Create a custom hook that takes a `callback` and a `delay`.
|
||||||
- Use the `React.useRef()` hook to create a `ref` for the callback function.
|
- Use the `React.useRef()` hook to create a `ref` for the callback function.
|
||||||
- Use the `React.useEffect()` hook to remember the latest callback.
|
- Use the `React.useEffect()` hook to remember the latest callback.
|
||||||
- Use the `Rect.useEffect()` hook to set up the timeout and clean up.
|
- Use the `React.useEffect()` hook to set up the timeout and clean up.
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
const useTimeout = (callback, delay) => {
|
const useTimeout = (callback, delay) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user