4 ms·
Does anyone use React with RoR? How do you combine them?
by endenwer 11y ago
Does anyone use React with RoR? How do you combine them?
- eviluncle 11y agoI know of these two projects that offer some guidance to combining RoR with React: https://github.com/shakacode/react_on_rails https://github.com/shakacode/react_on_rails https://github.com/netguru/react_webpack_rails https://github.com/netguru/react_webpack_rails Basically, you introduce webpack as part of your dev/build pipeline, it interacts nicely with the asset pipeline.
- phaedryx 11y agoMy current preference is the 'browserify-rails' gem. I set up a package.json file to manage my javascript, but I let the regular asset pipeline handle the css and images. I tried webpack for a while, but it seemed redundant when I already had the asset pipeline. I also like to add 'babelify' to my package.json and 'config.browserify_rails.commandline_options = "-t babelify"' to my application.rb to get ES6 goodness.
- liberale 11y agoRuby Gem https://github.com/reactjs/react-rails https://github.com/reactjs/react-rails works fine.