Hello, I’ve been trying to render a simple component but I can’t seem to get it to work. I’ve tried multiple approaches but it still shows nothing.
I have this in my HTML
<div id="root"></div>
Then I have this in JavaScript. Babel is enabled, I have added the necessary external scripts (react, react-DOM)
class TestComponent extends React.component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h1>test</h1>
</div>
)
}
}
ReactDOM.render(<TestComponent />, document.getElementById("root"));