react socekt.io many new connections code example
Example 1: import socket io frontend
<script src="/socket.io/socket.io.js"></script><script> const socket = io('http://localhost');</script>
Example 2: react receiving socket muitple times
socket.off('MY_EVENT').on('MY_EVENT', () => doThisOnlyOnce());