This is what I have in the state variable
this.state = {
check: 0,
places: ["0","0","0","0","0","0","0","0"],
}
}
What I am trying to do is call a function to update desired value of a location.
For example, I'm using changeValue
function like this:
changeValue= (event) => {
this.setState({
places[2]: "1",
});
}
And it's not working. I know I can pass a fully updated array but I need the other values of the current state.