Misha Moroshko 6 years ago
committed by Sophie Alpert
parent
commit
4fff01e641
  1. 2
      content/docs/hooks-reference.md

2
content/docs/hooks-reference.md

@ -105,7 +105,7 @@ By default, effects run after every completed render, but you can choose to fire
#### Cleaning up an effect
Often, effects create resources that need to be cleaned up before the component leaves the screen, such as a subscription or timer ID. To do this, the function passed to `useEffect` may return a clean-up function. For example, to create a subscription
Often, effects create resources that need to be cleaned up before the component leaves the screen, such as a subscription or timer ID. To do this, the function passed to `useEffect` may return a clean-up function. For example, to create a subscription:
```js
useEffect(() => {

Loading…
Cancel
Save