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
[x ] I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
The console.log in the useState inital value callback should only be executed once. But when you open the popover you get two messages in the console. This behavior is consistant with all other hooks. Which lead me to guess there is a duplicate copy of the popover children running in parallel. This will only happen in StrcitMode. If you render in regular mode it will only console.log once.
Expected Behavior 🤔
Only a single copy of the children will be created (if that's the issue). console.log should be called only once.
Steps to Reproduce 🕹
run the code above and look in the console
Context 🔦
Your Environment 🌎
Repro using MaterialUI code sandbox example for popover https://codesandbox.io/s/p6i6p,
just add the <StrictMode> around <Demo/> and add the <Debug/> component under the popover and look in the console
The text was updated successfully, but these errors were encountered:
useState(() => console.log("debug")); just for ease of repro called twice when in StrcitMode
Current Behavior 😯
The console.log in the useState inital value callback should only be executed once. But when you open the popover you get two messages in the console. This behavior is consistant with all other hooks. Which lead me to guess there is a duplicate copy of the popover children running in parallel. This will only happen in StrcitMode. If you render in regular mode it will only console.log once.
Expected Behavior 🤔
Only a single copy of the children will be created (if that's the issue). console.log should be called only once.
Steps to Reproduce 🕹
run the code above and look in the console
Context 🔦
Your Environment 🌎
Repro using MaterialUI code sandbox example for popover https://codesandbox.io/s/p6i6p,
just add the
<StrictMode>
around<Demo/>
and add the<Debug/>
component under the popover and look in the consoleThe text was updated successfully, but these errors were encountered: