why this code below doesn't work?
ReactDOM.render( <h1>Hello</h1>, document.getElementById('root'));
but this code works.
var elem = React.createElement('h1',{},"Hello");
ReactDOM.render( elem, document.getElementById('root'));
Coming back to react after long time..trying looking into the web.. didn't found it deprecated ? then why its not working?
Update: My browser console displays syntax error over here
ReactDOM.render( <h1>Hello</h1>, document.getElementById('root'));
UPDATE: Thanks for the help everything worked by adding the following line
<script type="text/babel">
<h1>is not valid JavaScript, it's JSX. So in order to run JSX, you need a compiler.