(no title)
Gravey | 3 years ago
One thing that’s called out in the linked docs is that duplicate console.logs were _deliberately_ silenced in React 17. I have no idea what they were thinking when they made this decision, but it sounds like it has been walked back in 18.
lioeters|3 years ago
> 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.
> 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.
marcus_cemes|3 years ago
SirHound|3 years ago
tomduncalf|3 years ago
jitl|3 years ago
joshribakoff|3 years ago
I don’t believe having devtools opens changes the runtime semantics of the app.that would defeat the point of the devtools.
I do know it annoyingly logs things twice
joshribakoff|3 years ago
> To help surface these issues, React 18 introduces a new development-only check to Strict Mode. This new check will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second mount.
SirHound|3 years ago
supermatt|3 years ago