Skip to content

Instantly share code, notes, and snippets.

@mizchi
Created January 1, 2014 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mizchi/8208430 to your computer and use it in GitHub Desktop.
Save mizchi/8208430 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
</head>
<body>
<div id="container"></div>
<script type="text/jsx">
/**
* @jsx React.DOM
*/
var Timer = React.createClass({
render: function() {
return <p>{this.props.prefix+Date.now()}</p>;
}
});
var container = document.getElementById('container')
setInterval(function() {
React.renderComponent(<Timer prefix={"hoge"}/>, container);
}, 200);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment