Browse Source

Explicitly list what methods are included in unmounting and remounting (#4618)

* Explicitly list what methods are included in unmounting and remounting

* Move up
main
Sebastian Silbermann 3 years ago
committed by GitHub
parent
commit
3411c0d0c4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      content/docs/strict-mode.md

10
content/docs/strict-mode.md

@ -21,7 +21,7 @@ In the above example, strict mode checks will *not* be run against the `Header`
* [Warning about deprecated findDOMNode usage](#warning-about-deprecated-finddomnode-usage)
* [Detecting unexpected side effects](#detecting-unexpected-side-effects)
* [Detecting legacy context API](#detecting-legacy-context-api)
* [Detecting unsafe effects](#detecting-unsafe-effects)
* [Ensuring reusable state](#ensuring-reusable-state)
Additional functionality will be added with future releases of React.
@ -172,6 +172,14 @@ When the component unmounts, effects are destroyed as normal:
* Effect effects are destroyed.
```
Unmounting and remounting includes:
- `componentDidMount`
- `componentWillUnmount`
- `useEffect`
- `useLayoutEffect`
- `useInsertionEffect`
> Note:
>
> This only applies to development mode, _production behavior is unchanged_.

Loading…
Cancel
Save