title: Hot reload is duplicating websockets
body: <p>I am creating a react app and using npm to hot reload the page on save. I am also connecting to a server through <strong>socket.io</strong> and it works great except that when I save the file and it reloads, it duplicates the socket and creates multiple active socket connections from a single page. Can I close the socket on reload somehow so that I keep only one socket active every time it reloads?</p>