I\'ve been going through a react.js tutorial, with a simple hello world example. I can\'t find a reason why the following shouldn\'t work, but I keep getting this error.
You should pass to render <HelloWorld />, not new HelloWorld()
<HelloWorld />
new HelloWorld()
React.render(<HelloWorld />, document.getElementById("test"))
Example
jsx-in-depth
Or you can use React.createElement, like so
React.createElement
React.render(React.createElement(HelloWorld, null), document.getElementById("test"))