title: Firestore realtime updates or Sockets.io for live chat
body: <p>I need to develop a chat with realtime updates for my web app.</p>
  
  <ul>
  <li>Front: React</li>
  <li>Back: Node</li>
  <li>Database: Firestore</li>
  </ul>
  
  <p>Today all my data queries are made in my backend through my REST API. I was thinking of using Sockets.IO but saw that Firestore also has data listeners (<a href="https://firebase.google.com/docs/firestore/query-data/listen" rel="nofollow noreferrer">https://firebase.google.com/docs/firestore/query-data/listen</a>).</p>
  
  <p>Can you help me choosing by pointing out potential pros/cons of each solution?</p>
  
  <p>Note that I never did any realtime chat feature before by myself so I may not see some obvious points. I don't want to start an opinion war and would like to find a solution to my particular problem for an app in production.</p>
  
  <p>For the moment I have:</p>
  
  <p><strong>Firestore data listeners</strong></p>
  
  <ul>
  <li>Implementation seems faster but I may not see some things (especially since my authentification is made with JWT on the server and not at all with firestore auth on the client)</li>
  <li>Offline capabilities out of the box</li>
  <li>Direct access from the client shall be faster?</li>
  </ul>
  
  <p><strong>Sockets.io</strong></p>
  
  <ul>
  <li>More documentation and sources</li>
  <li>I can migrate if needed</li>
  </ul>