Skip to content

Instantly share code, notes, and snippets.

@evangoer
Forked from anonymous/index.html
Last active April 7, 2017 22:40
Show Gist options
  • Save evangoer/b1722fba65320b1e4235 to your computer and use it in GitHub Desktop.
Save evangoer/b1722fba65320b1e4235 to your computer and use it in GitHub Desktop.
Starter React jsbin with JSX
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Starter React jsbin with JSX">
<script src="http://fb.me/react-with-addons-0.13.1.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var Hello = React.createClass({displayName: 'Hello',
render: function() {
return React.createElement("div", null, "Hello ", this.props.name);
}
});
React.render(React.createElement(Hello, {name: "World"}), document.body);
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<meta name="description" content="Starter React jsbin with JSX">
<script src="//fb.me/react-with-addons-0.13.1.js"><\/script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html></script>
<script id="jsbin-source-javascript" type="text/javascript">var Hello = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
React.render(<Hello name="World" />, document.body);
</script></body>
</html>
var Hello = React.createClass({displayName: 'Hello',
render: function() {
return React.createElement("div", null, "Hello ", this.props.name);
}
});
React.render(React.createElement(Hello, {name: "World"}), document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment