title: How do I pass devise data to a React component?
body: <p>I'm trying to pass Devise data to a React component. Devise is set up correctly, but I can't figure out how to pass the current_user info as props to my react_component. the React props current_user keeps logging as non-existent. I'm using React v5.1 and React-Rails v2.4.</p>
  
  <p>index.html.erb</p>
  
  <pre><code>&lt;%= react_component 'Main', props: {current_user: @current_user} %&gt;
  </code></pre>
  
  <p>_main.js.jsx</p>
  
  <pre><code>var Main = createReactClass({
      render () {
          return (
              &lt;div&gt;
                  {this.props.current_user.id}
                  &lt;Header /&gt;
                  &lt;Body /&gt;
              &lt;/div&gt;
          );
      }
  });
  </code></pre>