Skip to content

Instantly share code, notes, and snippets.

@UnbrandedTech
Created June 8, 2015 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UnbrandedTech/fe06f6639b2759c54101 to your computer and use it in GitHub Desktop.
Save UnbrandedTech/fe06f6639b2759c54101 to your computer and use it in GitHub Desktop.
Test
<!-- https://docs.google.com/drawings/d/1kMuI0J7GTbAGifhH2CpajqT1Vb2PXKYpunVlCsk6e0c/edit?usp=sharing -->
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
</style>
<script src="http://fb.me/react-0.12.2.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.2.js"></script>
</head>
<body>
<!-- create a container -->
<div id="app-container"></div>
<!-- note this is not type javascript -->
<script type="text/jsx">
/* create a class */
var RecipeBook = React.createClass({
render: function() {
return (
<div>
Hello, world! I am a RecipeBook.
</div>
);
}
});
/* controller view calls render */
React.render(
/* Recipe book is just a function, attrs are args */
<RecipeBook />,
document.getElementById('app-container')
);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment