Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

<Link> react import


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

   componentWillUnmount() {
       clearInterval(this.interval);
   }

Source by devarama.com #
 
PREVIOUS NEXT
Tagged: #react #import
ADD COMMENT
Topic
Name
3+9 =