-1
I’m trying to print a "Hello World!" on React.JS
Look at my code, it just doesn’t work:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="library/react.production.min.js"></script>
<script src="library/react-dom.production.min.js"></script>
<script src="library/babel.min.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
</script>
</body>
</html>
I’ve tried several times, it never works! What’s wrong there!?!?
React.js is actually in that library folder?
– White
Pull the CDN files, if it works it is pq the path there of the files are wrong.
– LeAndrade
No, no! The way is right. The . js files are stored in the library yes. Not even by CDN this React thing doesn’t work! I’ve tried so too!
– Jose Henrique