I\'m trying to organize my state by using nested property like this:
this.state = { someProperty: { flag:true } }
But updating
Create a copy of the state:
let someProperty = JSON.parse(JSON.stringify(this.state.someProperty))
make changes in this object:
someProperty.flag = "false"
now update the state
this.setState({someProperty})