This is, i believe, a real basic problem. Therefore i don't know why it doesn't work. I have React and React DOM installed through NPM.
Here's the HTML:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-type' content='text/html; charset=utf-8'>
<title>Basic Example</title>
</head>
<body>
<div id="container" style="height:200px;">
<p>Test</p>
</div>
</body>
<script type="test/jsx" src="main.js"></script>
</html>
and here's the JS:
var React = require('react');
var ReactDOM = require('react-dom');
var Hello = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
ReactDOM.render(
<Hello name="World" />,
document.getElementById('container')
);
I'm supposed to see a Hello World but only get a Test inside, thus meanings nothing is changed inside my div#container