https://github.com/fernandes/todomvc-rails-react
🔬todomvc using react, rails 5.1, webpacker, server side rendering
https://github.com/fernandes/todomvc-rails-react
experiment rails react todomvc todomvc-rails-react
Last synced: 5 months ago
JSON representation
🔬todomvc using react, rails 5.1, webpacker, server side rendering
- Host: GitHub
- URL: https://github.com/fernandes/todomvc-rails-react
- Owner: fernandes
- Created: 2017-06-28T23:24:40.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-14T02:06:47.000Z (over 3 years ago)
- Last Synced: 2024-04-14T15:38:03.605Z (about 2 years ago)
- Topics: experiment, rails, react, todomvc, todomvc-rails-react
- Language: Ruby
- Homepage: https://todo.sparklingbiz.com/
- Size: 676 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TodoMVC Rails React
todomvc.com example built using rails 5, [webpacker](https://github.com/rails/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
```bash
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.
- [X] 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](https://github.com/rails/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](https://github.com/tastejs/todomvc/tree/gh-pages/examples/react) created by [petehunt](http://github.com/petehunt/).