componentDidMount(){
this.interval = setInterval(function(){
document.getElementById("demo").innerHTML =moment().format('hh:mm:ss a');
},1000);
}
componentWillUnmount() {
clearInterval(this.interval);
}