title: React on Rails integration
body: <p>I'm looking to implement ReactJS as the view of my Rails application with <a href="https://github.com/reactjs/react-rails" rel="nofollow noreferrer">the gem react-rails</a>.
  So far, I've only used the standard <code>.erb</code> to render my views in my RoR application and I am wondering some questions about how to do it with React.</p>
  
  <p>For example, when you want to create a form for a model in RoR, you "just" create a form using :</p>
  
  <pre><code>&lt;%= form_for(@product) do |f| %&gt;
    &lt;%= f.text_field :name %&gt;
    ...
    &lt;%= f.submit %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And this automatically use the right route, generate the CSRF Token, use the right CSS <code>id</code> &amp; <code>class</code>, etc...</p>
  
  <p>Now, if I'm using React, I must take care of all of this ? And create form in JSX in the render, in the old fashioned way ?</p>
  
  <pre><code># My view .html.erb
  &lt;%= react_component 'Form', {} %&gt;
  
  # My js.jsx file
  var Form = React.createClass({
  render: function () {
    return (
      &lt;form className="new_my_model" onSubmit={this.handleSubmit}&gt;
        &lt;input style={inputStyle} type="text" className="my_model_name" /&gt;
        ...
        &lt;input type="submit" value="Post" /&gt;
      &lt;/form&gt;
    );
  }
  });
  </code></pre>
  
  <p>There is no "auto-generating feature" like Ruby for React ?</p>
  
  <p>I've found some ressources online about tutorial for React &amp; Rails (<a href="http://aspiringwebdev.com/react-js-and-flux-in-rails-a-complete-example/" rel="nofollow noreferrer">1</a>, <a href="https://hackhands.com/react-rails-tutorial/" rel="nofollow noreferrer">2</a>, <a href="https://www.airpair.com/reactjs/posts/reactjs-a-guide-for-rails-developers" rel="nofollow noreferrer">3</a>) but most of the time they says different things. Some use JSX, some coffee, while the <a href="https://facebook.github.io/react/docs/jsx-in-depth.html#why-jsx" rel="nofollow noreferrer">official React website recommend using JSX</a>. Some use <code>refs</code>, others use <code>states</code> and it's like this with everything!</p>
  
  <p>Is there a great tutorial that can be used as a reference for building the foundation of my application with React ?</p>