diff --git a/components/HelloWorld.js b/components/HelloWorld.js index 24e06e9..a84f8ba 100644 --- a/components/HelloWorld.js +++ b/components/HelloWorld.js @@ -1,7 +1,7 @@ -class HelloWorld extends React.Component { - render() { - return

Hello, World!

+var HelloWorld = React.createClass({ + render: function() { + return React.DOM.h1(null, "Hello World!") } -} +}) window.App.HelloWorld = HelloWorld diff --git a/index.html b/index.html index 3f1cd1d..57e0a9f 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,6 @@ React Simple - - - + + + diff --git a/index.js b/index.js index bf369c3..d5d172c 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ -const { HelloWorld } = window.App +var HelloWorld = window.App.HelloWorld -ReactDOM.render(, document.getElementById("app")) +ReactDOM.render(React.createElement(HelloWorld, null), document.getElementById("app"))