title: Best practices for React, Redux and Websocket (Keeping one class to handle requests)
body: <p>This question is related to React, Redux and Websocket (socket.io). </p>
  
  <p>In this approach I want to update my UI real time. I’m opening individual sockets in each <code>componentDidMount</code> in each file which I want to update. </p>
  
  <p><em>(Ex: if I have notification and statistics to update, I’ll open 2 sockets with both notification and statistics)</em></p>
  
  <p>One of my colleague suggested me that instead of opening multiple socket connections to each end point, open a single socket in a main <code>api-service</code> file and trigger actions respect to each key of the response. </p>
  
  <p>What’s the best practice to achieve this task and if there are any demos, please help me with one of them.</p>
  
  <p>Thank you! </p>