-
-
Save imgVOID/4aebce76acfb26ef16ba730e7722d0fb 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
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