Created
August 2, 2021 15:40
-
-
Save BetterProgramming/5ae52062536d4f469f2d9e2575da4966 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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