how to set state for an array in react js code example
Example: react native update state array of objects
let markers = [ ...this.state.markers ];
markers[index] = {...markers[index], key: value};
this.setState({ markers });
let markers = [ ...this.state.markers ];
markers[index] = {...markers[index], key: value};
this.setState({ markers });