title: Uncaught ReferenceError: state is not defined
body: <ul>
  <li>i am new to react.</li>
  <li><p>i am trying to use ‘connect’ to get value from template reducer</p></li>
  <li><p>i am facing the below errors
  Uncaught ReferenceError: state is not defined</p></li>
  <li><p>can you tell me how to fix it</p></li>
  <li><p>providing the whole code in fiddle
  <a href="https://jsfiddle.net/bmfzLs3z/3/" rel="nofollow">https://jsfiddle.net/bmfzLs3z/3/</a></p></li>
  <li><p>providing the snippet code below</p>
  
  <pre><code>let ReservationCard =  React.createClass({
      propTypes: {
           value: React.PropTypes.object.isRequired,
           profile: React.PropTypes.object.isRequired,
           SPORTSDetails: React.PropTypes.shape({
               error: React.PropTypes.object,
               SPORTSId: React.PropTypes.number,
               SPORTSName: React.PropTypes.string,
               SPORTSAmount: React.PropTypes.number,
               SPORTSDate: React.PropTypes.string,
               isRetrieving: React.PropTypes.boolean
           }),
           onEdit: React.PropTypes.func.isRequired
       },
  
       displayName: 'ReservationCard',
    })
  
    export default connect(state =&gt; ({
        profile: state.template.profile,
  
    }), null, null, {
        withRef: true // allows parent to access component functions
    })(ReservationCard);
  </code></pre></li>
  </ul>