Skip to content

Instantly share code, notes, and snippets.

@RyanAtViceSoftware
Last active July 18, 2019 16:12
Show Gist options
  • Save RyanAtViceSoftware/54fbe68ff27779ffcc71 to your computer and use it in GitHub Desktop.
Save RyanAtViceSoftware/54fbe68ff27779ffcc71 to your computer and use it in GitHub Desktop.
Hello React - Hello World in ReactJs 1.3 without using JSX
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Hello React</title>
<script src="https://fb.me/react-with-addons-0.14.0.js"></script>
<script src="https://fb.me/react-dom-0.14.0.js"></script>
</head>
<body>
<script>
var HelloReact = React.createClass({
render: function() {
return React.DOM.h1(null, 'Hello React');
}
});
ReactDOM.render(React.createElement(HelloReact), document.body);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment