todomvc.com example built using rails 5, webpacker and react.
bundle install
cd vendor && yarn install && cd ..
foreman start
open http://localhost:5000/
If you wanna simulate a production environment compile the assets and run in production environment
rake assets:precompile # will compile webpack too
RAILS_SERVE_STATIC_FILES=true SECRET_KEY_BASE="secretkey" RAILS_ENV=production rails s -b 0.0.0.0 -p 5000
The code is port of a v0.13 react version, so I intend to make it follow the best practices described on v15 documentation.
- Add system tests
- Add redux and rails API
- REST
- GraphQL
This project is using react-rails
to deliver the component rendered on the server side (Server Side Rendering), also applied some techniques to make Google happy and get a 100 grade on Google PageSpeed Insights
Also, the projects uses actionpack-action_caching gem, once the idea is cache the first access so rails don't need to process the react component every single access, as the memory store is being used, no worries about increasing the version number.
Based on original work todomvc react created by petehunt.