title: Better way to empty all the values of an object by setState in react
body: <p>I am using React. This is my state</p>
  
  <pre><code>state = {
  customerData: {
        id: '',
        name: '',
        type: '',
        place: '',
        country: '',
        timezone: 'GMT+5:30',
        status: false
      }
  }
  </code></pre>
  
  <p>There is an edit functionality where the <strong>customerData</strong> object gets populated on click of edit button. I am showing this data in a modal. </p>
  
  <p>Now in the modal, when I click the submit button, the modal should hide and the data populated in the <strong>customerData</strong> object should be empty. I can do it like this:</p>
  
  <pre><code>this.setState({
  customerData: {
        ...this.state.customerData
        id: '',
        name: '',
        type: '',
        place: '',
        country: '',
        timezone: '',
        status: false
      }
  }
  })
  </code></pre>
  
  <p>I am wondering is there any one line way in ES6 to make the <strong>customerData</strong> Object empty. Because, if there are too many fields, it will be difficult.</p>