Im trying to learn react js by following this tutortial in youtube. My program is just a very simple html code with some react.js. I follow every single step he made but I did not get the same result as he did. Can you please tell me what is wrong in my code and why is it not working?
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Haime Computer Shop</title>
<link rel="stylesheet" type="text/css" href="index_css.css">
<script src="src/js/react.min.js"></script>
<script src="src/js/react-dom.min.js"></script>
<script src="src/js/browser.min.js"></script>
</head>
<body>
<div class="homeLinks_dcls">
<p><a href="index.html" id="home_id"> Home</a></p>
<p><a href="aboutUs.html" id="aboutUs_id"> About Us</a></p>
<p><a href="services.html" id="services_id"> Services</a></p>
<p><a href="contactUs.html" id="contactUs_id"> Contact us</a></p>
</div>
<div id="container"></div>
<script type="text/babel">
var myReactObj = React.createClass({
render: function(){
return (<h2>This is a component!</h2>);
}
});
ReactDOM.render(<myReactObj/>, document.getElementById('container'));
</script>
</body>
</html>
I can only see the "Home, About Us, Services, Contact Us" text. What I can not see is the "This is a component!" text inside the myReactObject. Thanks in advance for the help...