I am trying to update only one element in an array state but i am not sure of how to do it.
State
constructor(props) { super(pro
state
this.state = { barcodeArray:[''] };
update array
var barcode_text='hi'; this.setState({ barcodeArray:[...this.state.barcodeArray,barcode_text] })}