You’ve just gotten done with your React 18 upgrade, and, after some light QA testing, don’t find anything. You decide to make a minimal reproduction and create a demo of said hook. You expect it to throw an “alert” dialog after a second of waiting, but weirdly, the dialog never runs at all. The reason your app broke in React 18 is that you’re using Strict Mode.

4m read timeFrom dev.to
Post cover image
Table of contents
Proof of broken componentWhat changed in React 18?How to fix the remounting bugConclusion

Sort: