title: Uncaught TypeError: Cannot read property 'createClass' of undefined
body: <p>I have been trying to use react router in one of my application. But am getting </p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'createClass' of undefined
  </code></pre>
  
  <p>on line </p>
  
  <pre><code>var DefaultRoute = React.createClass({ ..
  </code></pre>
  
  <p>The code I have been writing is </p>
  
  <pre><code>var Q                       = require('q'), 
      doThis                  = require('./generic/modules/doThis.js'),
      doThat                  = require('./generic/modules/doThat.js');
  var React = require('react');
  var Router = require('react-router');
  var Route = Router.Route;
  var Redirect = Router.Redirect;
  var DefaultRoute = Router.DefaultRoute;
  
  var aModule = require('./modules/aModule/aModule.js');
  var Master = require('./modules/master/master.js');
  
  var injectTapEventPlugin = require('react-tap-event-plugin');
  
  (function (){
  
      var routes = (
          &lt;Route name="root" path="/" handler={Master}&gt;
              &lt;Route name="time" handler={aModule} /&gt;
          &lt;/Route&gt;);
      window.React = React;
      injectTapEventPlugin();
  
      var doThisPromise = doThis.init();
      doThisPromise.
      then(function() {
          doThat.init();
          Router.run (routes, function(Handler) {
              console.log('in router run');
              React.render(&lt;Handler/&gt;, document.body);
          });
      }, function (err) {
  
      });
  })();
  </code></pre>
  
  <p>If necessary please ask and I will also provide the route related js</p>
  
  <p>-- EDIT --
  The relevant error code from the build file</p>
  
  <pre><code>},{}],84:[function(require,module,exports){
  var React = (window.React);
  var FakeNode = require('../mixins/FakeNode');
  var PropTypes = require('../utils/PropTypes');
  
  /**
   * A &lt;DefaultRoute&gt; component is a special kind of &lt;Route&gt; that
   * renders when its parent matches but none of its siblings do.
   * Only one such route may be used at any given level in the
   * route hierarchy.
   */
  
  var DefaultRoute = React.createClass({
  
    displayName: 'DefaultRoute',
  
    mixins: [ FakeNode ],
  
    propTypes: {
      name: React.PropTypes.string,
      path: PropTypes.falsy,
      handler: React.PropTypes.func.isRequired
    }
  
  });
  
  module.exports = DefaultRoute;
  </code></pre>