Uncaught TypeError: React.createClass is not a function
<p>To make a react component, i used the following code</p>

<pre><code>var React = require('react');

var RandomWords = React.createClass({
  render: function() {
    return (
      &lt;div &gt;
        &lt;h4&gt;Random words come here&lt;/h4&gt;
      &lt;/div&gt;
    );
  }
});

module.exports =RandomWords;
</code></pre>

<p>and then i call this componnet in the root componnet using this:</p>

<pre><code>define(["./RandomWords","react", "react-dom"],
  (React, ReactDOM) =&gt; {

      var Root = React.createClass({
        render: function() {
          return (
            &lt;div &gt;
              &lt;h1&gt;Welcome to our game&lt;/h1&gt;
              &lt;RandomWords/&gt;
              &lt;UserInput/&gt;
              &lt;Statistic/&gt;
            &lt;/div&gt;
          );
        }
      });



      ReactDOM.render(
        React.createElement(Root, null),
        document.getElementById('content')
      );
});
</code></pre>

<p>but it complains that:</p>

<pre><code>Uncaught TypeError: React.createClass is not a function
</code></pre>

<p>It seems to me it is because of <code>define(["./RandomWords","react", "react-dom"]</code>, but i don't know how can i fix it?</p>