I am creating hierarchical React Component using JSX. The code does not show any errors but nothing shows up on my page. Here is my code below.
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>React Test</title>
</head>
<body>
<div id="app">
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
<script type="text/babel">
var Converter = React.createClass({
render: function() {
return <inputBox />;
}
});
var inputBox = React.createClass({
render: function() {
return <h1>Hello World!</h1>;
}
});
ReactDOM.render(
React.createElement(Converter, null),
document.getElementById('app'),
);
</script>
</body>
</html>
when i use
ReactDOM.render(
React.createElement(inputBox, null),
document.getElementById('app')
);
Hello World! Shows up. What am I doing wrong? I have tried debugging a lot but could not figure out anything.