Skip to content

Commit 0982707

Browse files
authored
Update StrictMode docs about double logging (#4531)
1 parent 1c5a6c1 commit 0982707

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/docs/strict-mode.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ By intentionally double-invoking methods like the component constructor, strict
119119

120120
> Note:
121121
>
122-
> 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+
> In 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).
123+
>
124+
> Starting from React 18, React does not suppress any logs. However, if you have React DevTools installed, the logs from the second call will appear slightly dimmed. React DevTools also offers a setting (off by default) to suppress them completely.
123125
124126
### Detecting legacy context API {#detecting-legacy-context-api}
125127

0 commit comments

Comments
 (0)