title: React JSX: Cache Props?
body: <p>When accessing the same <code>props</code> value multiple times in React/JSX, is it advisable to cache the object in a local variable?</p>
  
  <pre class="lang-js prettyprint-override"><code>var ItemComponent = React.createClass({
  
    render: function() {
  
      var cached = this.props.item;
  
      return (
        &lt;div className={cached.class}&gt;
          &lt;h1&gt;{cached.heading}&lt;/h1&gt;
          &lt;p&gt;{cached.text}&lt;/p&gt;
        &lt;/div&gt;
      );
    }
  });
  </code></pre>