I want to show the current time(MM/DD/YY hh:mm:ss) in react native app like a clock, and get update every seconds, I tried using new Date() and set it in state, but the time don
I got the answer. The code below also works.
componentWillMount(){ setInterval(function(){ this.setState({ curTime: new Date().toLocaleString() }) }.bind(this), 1000); }