Spent a day debugging a WebSocket that connected twice. React 18 Strict Mode mounts components twice in dev…
Kabir Singh
Full Stack Dev | Node.js, React, MongoDB | Travel-tech | Open to backend-heavy roles
Spent a day debugging a WebSocket that connected twice. React 18 Strict Mode mounts components twice in dev to surface missing cleanups. Returning a cleanup function that closes the socket fixed it. Strict Mode was right all along 😅
8 reactions2 comments
