Skip to content

Instantly share code, notes, and snippets.

@nileshgulia1
Created August 23, 2017 17:29
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 nileshgulia1/319bbadf515551b7c55f9c31761db647 to your computer and use it in GitHub Desktop.
Save nileshgulia1/319bbadf515551b7c55f9c31761db647 to your computer and use it in GitHub Desktop.
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
function tick(){
let element=(
<div>
<h1>hello world</h1>
<h2>it is {new Date().toLocaleTimeString()}</h2>
</div>
);
ReactDOM.render(element, document.getElementById('sample'));
}
setInterval(tick,1000);
<title> My React App</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment