Property 'render' does not exist in type 'typeof __React'
When compiling a script
/// <reference path="./typings/react/react.d.ts" /> import React = __React; var content = <div>Hello, world!</div>; React.render(content, document.getElementById('output')); I get an error
$ tsc --jsx react app.tsx app.tsx(6,7): error TS2339: Property 'render' does not exist on type 'typeof __React'.
Is there any way to fix this? Thanks
import React = __React;
Please use import React = require('react') ... but this is not the source of your error
React.render(content, document.getElementById('output'));
Use ReactDOM.render( instead of React.render . Get the reaction as import ReactDOM = require('react-dom') . This is necessary for the 0.14 reaction.
Alternatively, you can get old definitions for React.