I\'m trying to organize my state by using nested property like this:
this.state = { someProperty: { flag:true } }
But updating
I found this to work for me, having a project form in my case where for example you have an id, and a name and I'd rather maintain state for a nested project.
return ( Project Details this.setState({ project: {...this.state.project, id: event.target.value}})} /> this.setState({ project: {...this.state.project, name: event.target.value}})} /> )
Let me know!