-
-
Save Rockyspade/7f9fd3cba2dff908119220b2c222599d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
var ExampleApplication = React.createClass({ | |
render: function() { | |
var elapsed = Math.round(this.props.elapsed / 100); | |
var seconds = elapsed / 10 + (elapsed % 10 ? '' : '.0' ); | |
var message = | |
'React has been successfully running for ' + seconds + ' seconds.'; | |
return <p>{message}</p>; | |
} | |
}); | |
var start = new Date().getTime(); | |
setInterval(function() { | |
ReactDOM.render( | |
<ExampleApplication elapsed={new Date().getTime() - start} />, | |
document.getElementById('container') | |
); | |
}, 50); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update status linguistic<script importReact src="https://gist.github.com/Rockyspade/7f9fd3cba2dff908119220b2c222599d.js"></script>-gist ##'head'Pr #ForkCLI cozos.example.jsx