title: How to implement long polling for React + axios
body: <p>I'm using React + <a href="https://github.com/axios/axios" rel="noreferrer">axios</a> to talk to the API from the client side. I'm a newbie in JavaScript.</p>
  
  <p>How would I implement long polling so I get near real-time updates on a web page?</p>
  
  <p>Is there a better way to do real-time updates on the page, when backend is a JSON REST API? Should I look into using WebSockets or server side events or long polling is fine?</p>