This is the React comment box example from the React tutorial adapted to use websockets (with flashsocket and xhr polling fallback) through socket.io instead of ajax polling. This is less code, less expensive, and more secure.
The ajax version of this repository includes three different servers. Here, I only provide a websockets implementation of the node server. It serves static files from public/
and fetches/adds data through socket.io events. Start a server with:
npm install
node server.js
And visit http://localhost:3000/. Try opening multiple tabs!