title: How to make setState with nested object
body: <p>How do I use setState if am having nested object. I have a json list using that I update this state. but Suppose if I want to update only a Phone Number field in this state then how  do I make it. Below code gives me error</p>
  
  <pre><code>this.setState(prevState =&gt; ({
     myData: {
               ...prevState.myData,
               user: { ...prevState.myData.user, PhoneNumber: value }
              }
  }));
  
  interface IData  {
      ID:number,
      usage:string,
      user:IUser
  }
  
  interface IUser{
      name:string,
      PhoneNumber:number
  }
  </code></pre>