React.JS Introduction 01

React Js browser include

// React Core library
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> 
// React dom library
<script crossoriginsrc="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
// Convert ES6 to ES5 
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

JS code

<script type="text/babel">
ReactDOM.render(
    <h1>Hello, world!</h1>,
    document.getElementById('example')
);
</script>
// Insert h1 to node h1.

HTML code

<div id="example"></div>

If we want to use JSX, we have to add type=”text/babel” to the script.