Tambahkan array objek ke negara bereaksi
setTheArray(currentArray => [...currentArray, newElement])
Jeff Le
setTheArray(currentArray => [...currentArray, newElement])
var joined = this.state.myArray.concat('new value');
this.setState({ myArray: joined })