title: Configuring Iron Router in Meteor - React
body: <p>Using Meteor 1.2.0.1 and React. My simple app works great but now I needed <a href="https://github.com/iron-meteor/iron-router" rel="nofollow">iron router</a>.</p>
  
  <p><strong>app layout:</strong></p>
  
  <pre><code>client\
    app.jsx
  lib\
    router.jsx
  server
  views\
    home.jsx
    layout.jsx
  </code></pre>
  
  <p><strong>home.jsx:</strong></p>
  
  <pre><code>Home = React.createClass({
    render() {
      return (
        &lt;div&gt;
          &lt;h3&gt;Hello World&lt;/h3&gt;
          &lt;p&gt;from home&lt;/p&gt;
        &lt;/div&gt;
      );
    }
  });
  </code></pre>
  
  <p><strong>layout.jsx:</strong></p>
  
  <pre><code>Layout = React.createClass({
    render() {
      return (
        &lt;div&gt;
          {this.props.children}
        &lt;/div&gt;
      );
    }
  });
  </code></pre>
  
  <p><strong>routes.jsx:</strong></p>
  
  <pre><code>Router.route('/', () =&gt; {
    let page = (
      &lt;Layout&gt;
        &lt;Home/&gt;
      &lt;/Layout&gt;
    );
    React.render(page, document.body);
  });
  </code></pre>
  
  <p>Surely enough, in my <code>app.jsx</code>, works great as it displays to the body of the html but the setup would not work for a multi-page app so this is the need for routes. Inside is:</p>
  
  <pre><code>Meteor.startup(() =&gt; {
    let app = (
      &lt;Layout&gt;
        &lt;Home/&gt;
      &lt;/Layout&gt;
    );
    React.render(app, document.body);
  });
  </code></pre>
  
  <p>The question is, how to get iron router (<code>routes.jsx</code>) to show the contents?</p>