Skip to content

🔬todomvc using react, rails 5.1, webpacker, server side rendering

Notifications You must be signed in to change notification settings

fernandes/todomvc-rails-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TodoMVC Rails React

todomvc.com example built using rails 5, webpacker and react.

Development

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

TODO

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

Performance

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.

Thanks

Based on original work todomvc react created by petehunt.