Skip to content

Commit e9da0fa

Browse files
infinnieeps1lon
andauthored
Update strict-mode.md (#3426)
Co-authored-by: Sebastian Silbermann <[email protected]>
1 parent 1fe2381 commit e9da0fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: content/docs/strict-mode.md

+4
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ At first glance, this code might not seem problematic. But if `SharedApplication
116116

117117
By intentionally double-invoking methods like the component constructor, strict mode makes patterns like this easier to spot.
118118

119+
> Note:
120+
>
121+
> Starting with React 17, React automatically modifies the console methods like `console.log()` to silence the logs in the second call to lifecycle functions. However, it may cause undesired behavior in certain cases where [a workaround can be used](https://github.com/facebook/react/issues/20090#issuecomment-715927125).
122+
119123
### Detecting legacy context API {#detecting-legacy-context-api}
120124

121125
The legacy context API is error-prone, and will be removed in a future major version. It still works for all 16.x releases but will show this warning message in strict mode:

0 commit comments

Comments
 (0)