title: React socket.io-client with Python flask_socketio not handling events
body: <p>I am implementing websockets on my app. The connection occurs but the echo event never triggers and I can't see why. The server serves my index.html successfully and the "Connected" line does log on my server and I'm not getting any 404s or refused connections on my front end or errors on my server.</p>
  
  <p>Client code:</p>
  
  <pre><code>componentDidMount() {
          const socket = socketIOClient(ipaddress)
          socket.on('connection', () =&gt; socket.emit('echo', { data: 'hello' }))
          socket.on('echoresponse', ({ data }) =&gt; {
              console.log(data)
              socket.disconnect()
          })
  }
  </code></pre>
  
  <p>Server code:</p>
  
  <pre><code>app = Flask(__name__,
                  static_url_path='', 
                  static_folder='dist',
                  template_folder='dist')
  
  socketio = SocketIO(app)
  
  @app.route('/')
  def home():
      return app.send_static_file('index.html')
  
  @socketio.on('connect')
  def connected():
      print('Connected')
  
  @socketio.on('disconnect')
  def disconnected():
      print('Disconnected')
  
  @socketio.on('echo')
  def echo(message):
      emit('echoresponse', {'data': message['data']})
  
  socketio.run(app, host='0.0.0.0', port=80)
  </code></pre>