score:1

Accepted answer
this.setState({
  dailyData: initialDailyData,
}, () => {
  console.log(this.state.dailyData) // you are received updated value
})

score:0

  this.setState({
            dailyData: initialDailyData,
        },()=>{ console.log(this.state.dailyData)
});


Related Query

More Query from same tag