Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nayunhwan
Last active December 27, 2016 16:55
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 nayunhwan/39569b4c5f67ea77438e7a789db73255 to your computer and use it in GitHub Desktop.
Save nayunhwan/39569b4c5f67ea77438e7a789db73255 to your computer and use it in GitHub Desktop.
React Reference TickingClock Example
function tick() {
const element = (
<div>
<h1>Hello, world!</h1>
<h2>It is {new Date().toLocaleTimeString()}.</h2>
</div>
);
ReactDOM.render(
element,
document.getElementById('root')
);
}
setInterval(tick, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment