title: React error: Cannot read property 'context' of undefined
body: <p>I want to access the context in my component, but I get this error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'context' of undefined</p>
  </blockquote>
  
  <pre><code>var React = require('react'),
  var ReactIntl = require('react-intl');
  
  class ContactSearch extends React.Component {
  
      constructor(props) {
          super(props);
  
      }
  
  
      _handleFormSubmit(e) {
          if (this.context.router) {  //I can't access this.context in here
              e.preventDefault();
          ......
          }
      }
  
  
      render() {
          return (
              &lt;div className="search-container"&gt;
                  {this.renderSearch()}
              &lt;/div&gt;
          );
      }
  }
  
  ContactSearch.propTypes = {};
  ContactSearch.defaultProps = {};
  
  module.exports = ReactIntl.injectIntl(ContactSearch);
  </code></pre>
  
  <p>Can I get some help about why this.context doesn't exist?</p>
  
  <p>Thanks!</p>