Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created August 2, 2021 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BetterProgramming/5ae52062536d4f469f2d9e2575da4966 to your computer and use it in GitHub Desktop.
Save BetterProgramming/5ae52062536d4f469f2d9e2575da4966 to your computer and use it in GitHub Desktop.
class Time extends React.Component {
constructor(props) {
super(props);
this.state = {date: date: new Date()};
}
render() {
return (
<div>
<h1>It is {this.state.date.toLocaleTimeString()}</h1>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment