setstate array in react 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 });