I have an array of [false,true,false,false,true] I want to change these boolean values based on index number . I tried my best but didn't find a solution to resolve this issue. I want to be done this in react .
this.setState({
stateValue:[...array,array[0]=true]
})
I tried with this solution but it can add value at the end of array
setState?