3 ms·
Pretty sure its been doing this in dev mode since 0.14. Maybe earlier...
by supermatt 5y ago
Pretty sure its been doing this in dev mode since 0.14. Maybe earlier...
- tomduncalf 5y agoYeah I think what might be going on is a combination of Next.js switching to strict mode at some point, and React 17 hiding the double logs. I’d never seen the behaviour before (but had never explicitly used strict mode - to be honest I didn’t know it existed!) and switching between React 17 and 18 was enough to make it happen, so I assumed that was the responsible change, but actually it’s a bit more subtle. Thought it might be useful to share for people who are using Next.js anyway, as for me it just started happening when I created a new project with no explanation which led to me thinking I was losing it for a while, lol.
- joshribakoff 5y agothe hacker news title just isn’t precise about what part of it changed and doesn’t even link to the relevant article https://reactjs.org/blog/2022/03/29/react-v18.html#new-strict-mode-behaviors https://reactjs.org/blog/2022/03/29/react-v18.html#new-stric...