Skip to content

Commit

Permalink
Update StrictMode docs about double logging (reactjs#4531)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Mar 30, 2022
1 parent 1c5a6c1 commit 0982707
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/docs/strict-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ By intentionally double-invoking methods like the component constructor, strict

> Note:
>
> 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).
> 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).
>
> 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.
### Detecting legacy context API {#detecting-legacy-context-api}

Expand Down

0 comments on commit 0982707

Please sign in to comment.