Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Aside from being development-only, note that you also need to wrap a component in `<React.StrictMode>…</React.StrictMode>` to opt it into this.


Yeah, good point - I thought it could be that Next.js changed their default behaviour to use strict mode when they upgraded to React 18 but another comment says React 17 silenced the duplicate logs(!) so maybe the change is older than that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: