React Basic : Create A Button with React

React Basic : Create A Button with React

<!doctype html>

<html>
<head>
<title>React – Create Button</title>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”initial-scale=1.0″>
</head>
<script crossorigin src=”https://unpkg.com/react@16/umd/react.development.js”></script>
<script crossorigin src=”https://unpkg.com/react-dom@16/umd/react-dom.development.js”></script>

<body>

<div id=”root”></div>
<script type=”text/javascript”>
const button = React.createElement( ‘button’, { type:’button’}, ‘Save’ );

ReactDOM.render(button, document.getElementById(‘root’));

</script>

</body>
</html>