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
Try this using create function
onEditComparatorClicked(i) { let editableComparatorIndexes = [...this.state.markers]; editableComparatorIndexes[i] = 1; this.setState({editableComparatorIndexes}); }