You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yakimych
changed the title
Bug: Value printed to console is rendered incorrectly by React
Bug: Value printed to console is rendered incorrectly in StrictMode
Aug 15, 2021
React version: 17.0.2
Steps To Reproduce
The following minimal repro sample is used to indicate a props change in a component:
Clicking the "Test" button prints the value "Changed: yes" to the console, while React renders "no":
Note: this works as expected if I remove the
<StrictMode>
wrapper in index.js.Link to code example: https://codesandbox.io/s/youthful-jang-2xw3i?file=/src/App.js
The current behavior
"Changed: yes" in printed to console, but "Changed: no" is rendered by React.
The expected behavior
"Changed: yes" in printed to console, "Changed: yes" is rendered by React.
The text was updated successfully, but these errors were encountered: