React Sync Demo

README.md

Deploy

This is a modified version of the React comment box example from the React tutorial. The example app has been modified to demonstrate syncing updates and offline activity across devices.

Demo GIF

To use

Start the server with:

npm install
node server.js

And visit http://localhost:3000/. Try opening multiple tabs!

You can change the port number by setting the $PORT environment variable before invoking the script, e.g.,

Development

Primus is set to create a new public/scripts/primus.js file when the server starts. If you’re using nodemon to restart on file changes:

nodemon --ignore public --ignore comments.json

Webpack config in webpack.config.js runs DefinePlugin to set NODE_ENV to production, and UglifyJS to minify files. Comment out the plugins, then run webpack:


Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/zI_pRbMc7ec/react-sync-demo

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: