1import React, { Component } from 'react';
2
3class TimeComponent extends Component {
4 constructor(props){
5 super(props);
6 this.state = { time: Date.now() };
7 }
8 render(){
9 return(
10 <div> { this.state.time } </div>
11 );
12 }
13 componentDidMount() {
14 console.log("TimeComponent Mounted...")
15 }
16}
17
18export default TimeComponent;
19