mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
Add : (#1321)
This commit is contained in:
committed by
Sophie Alpert
parent
1823921be0
commit
4fff01e641
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user