score:0

Accepted answer
this.setState((prevState) => ({
  data : [...prevState.data].concat(props)
}))

score:0

(supposed that your state array is called arrayVar)
this.setState(prevState => ({
  arrayvar: [...prevState.arrayVar, ...data]
}))

score:1

this.setState((prevState) => ({
  data: [...prevState.data, ...props]
}));

Related Query

More Query from same tag