From 3411c0d0c4500a68d1284fbf17111a2fb5b5b99b Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Mon, 2 May 2022 22:00:09 +0200 Subject: [PATCH] Explicitly list what methods are included in unmounting and remounting (#4618) * Explicitly list what methods are included in unmounting and remounting * Move up --- content/docs/strict-mode.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/docs/strict-mode.md b/content/docs/strict-mode.md index fdb460c1..b911381d 100644 --- a/content/docs/strict-mode.md +++ b/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_.