score:0

i wish i could use this as a comment, but i am recreating exactly what you have and cannot replicate your error. your code is hard to interpret and that might be throwing me/us off. this is my implementation of your handleupdate

const chartdata = this.updated ? chart2 : chart1
this.setstate({chartdata}, () => {
  this.updated = this.updated ? false : true
})

Related Query

More Query from same tag