A Rails5, ActionCable, Redux/React ChatApp Example, now with Webpack/HMR for rapid development
[Updated Feb 27, 2016] Now with Webpack and Hot Module Replacement (HMR) for rapid development
Rails5 brings the long-awaited ActionCable (integrated websockets) into the game. Combined with the Redux implementation of Flux - and of course React components - there's potential here for an interesting stack if you don't want to create a separate front-end app and use Rails5 as an API server (which it now more easily does out of the box as an option, BTW).
I spent some time over the holiday break pulling examples from:
..to create a very simple chat app. Live demo here.
If you're curious to learn more, I posted some background/motivation and a code walkthrough on my Medium account here. Another post discussing the webpack/HMR addition is coming soon.
config/database.ymland setup your username to be whatever super user (PostgreSQL) you have on your local machine.
rails db:seedto add a quick "Hello World" message into the database.
rails sand point your web browser to
That's it for now!