- Client vs server rendering
- Hmr and hot reloading with the webpack dev server
- How to use different files for client and server rendering
- React server rendering
- Render functions and railscontext
- Rspec configuration
- Webpack configuration
- Upgrading react on rails
- React on rails overview
- Minitest configuration
- How to conditionally server render based on device type
- How react on rails works
- File system based automated bundle generation
- Installation into an existing rails app
- Rails webpacker react integration options
- Convert rails 5 api only app
- Rails engine integration
- Asset pipeline
- Capistrano deployment
- Converting from custom webpack config to rails webpacker config
- Code splitting
- Angular js integration migration
- Foreman issues
- React and redux
- React router
- React helmet
- Server rendering tips
- Troubleshooting when using webpacker
- Webpack v1 notes
- Node dependencies and npm
- Generator details
- Migrating from react rails
- Updating dependencies
- Upgrade webpacker v3 to v4
- Manual installation overview
- Recommended project structure
React on rails pro
Copyright 2020 ShakaCode
React on Rails
React on Rails integrates Rails with (server rendering of) Facebook's React front-end framework.
To provide a high performance framework for integrating Ruby on Rails with React via the Webpacker gem especially in regards to React Server-Side Rendering for better SEO and improved performance.
Features and Why React on Rails?
rails/webpacker gem already provides basic React integration, why would you use "React on Rails"?
- Easy passing of props directly from your Rails view to your React components rather than having your Rails view load and then make a separate request to your API.
- Tight integration with rails/webpacker.
- Server-Side Rendering (SSR), often used for SEO crawler indexing and UX performance, is not offered by
- Support for HMR for a great developer experience.
- Supports latest versions of React with hooks.
- Redux and React Router integration including server-side-rendering.
- Internationalization (I18n) and (localization)
- A supportive community. This web search shows how live public sites are using React on Rails.
- ReScript (Reason ML) Support.
See the react-webpack-rails-tutorial for an example of a live implementation and code.
Ruby on Rails >=5 and rails/webpacker 4.2+.