# 从零开始
- Rails 中安装 React 请参考
# 生成 components 文件夹及 components.js,并添加组建到 application.js
rails g react:install
- 如果需要使用 mixin React.addons
I'm trying locally with the newest version:
~/projects/magic_browser $ bundle show react-rails
/Users/rmosolgo/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/react-rails-1.1.0
and in application.rb:
config.react.addons = true
And it's defined in the browser: