Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Created December 21, 2015 18:07
Show Gist options
  • Select an option

  • Save StoneCypher/9028ce056f699bbe1a12 to your computer and use it in GitHub Desktop.

Select an option

Save StoneCypher/9028ce056f699bbe1a12 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React.js Hello World!</title>
<script defer src="https://fb.me/react-0.13.3.js"></script>
<script defer src="https://fb.me/JSXTransformer-0.13.3.js"></script>
<script defer type="text/jsx">
var Anchor = React.createClass({
render: function() { return <a onClick={function() { window.alert('works'); }}>test</a>; }
});
function trigger() { React.render(<Anchor/>, document.getElementById('hello')) }
</script>
</head>
<body onload="trigger();">
<div id="hello"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment