What is polling?

In order to check whether new comments are added, we can periodically check the server for updates. Use setInterval on componentDidMount every 5 second call the _FetchComment function.
This might sound expensive, but it's not.React optimizes the rendering process by only updating the DOM when changes are detected on the resulting markup.

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.