title: React.render in TypeScript for component with both props and state
body: <p>I have a TypeScript TSX file with a React component like this:</p>
  
  <pre><code>interface IHiProps {
    a: string;
    b: string;
  }
  
  interface IHiState {
  
  }
  
  class Hi extends __React.Component&lt;IHiProps, IHiState&gt; {
    // render…
  }
  </code></pre>
  
  <p>How do I correctly render this component in TypeScript?</p>
  
  <pre><code>var hiComponent: __React.Component&lt;IHiProps, IHiState&gt;;
  hiComponent = __React.render(__React.createElement(Hi), { a: "A", b: "B" }, document.body);
  </code></pre>
  
  <p>This fails me with <em>Argument of type 'typeof Hi' is not assignable to parameter of type 'ComponentClass'</em>. I am using definitely typed files from <a href="https://github.com/borisyankov/DefinitelyTyped/blob/master/react/react.d.ts" rel="nofollow">the DefinitelyTyped repository of Boris Yankov</a>.</p>