Wali faizy Wali faizy - 1 year ago 59
React JSX Question

React hello world progrma is not working

As i am new to react and i am trying to make react a simple hello world in react but it is saying React.render is not a function

<meta charset="UTF-8">
<script src="https://unpkg.com/react@15.3.1/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@15.3.1/dist/react-dom.min.js"></script>

React.render(React.createElement('div', null, 'Hello World'),document.body);

Answer Source

What used to be React.render() is now called ReactDOM.render():

ReactDOM.render(React.createElement('div', null, 'Hello World'),document.body)