title: clearing particular contents of a modal upon closing in react
body: <p>i am using bootstrap class to call a Modal in react component where in the right side of a Modal body has axios call , I want to clear the right side of the Modal upon clicking either the close button or 'X' button so that the next Popup the right side will be empty again , Is it possible ?? If yes , not sure how exactly to accomplish as there are inbuilt bootstrap classes . </p>
  
  <pre><code>triggerHandler(){
  axios.post(`http://localhost:8200/playit`)
    .then( response=&gt;{
      console.log(response.data)
      this.setState({
          value:response.data
      })
    })
   }
  render(){
  let value = this.state.value
  return(
    &lt;div&gt;
      &lt;div className="modal fade bd-example-modal-lg" id="exampleModal" tabIndex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"&gt;
        &lt;div className="modal-dialog modal-lg" role="document"&gt;
          &lt;div className="modal-content"&gt;
            &lt;div className="modal-header"&gt;
              &lt;h5 className="modal-title" id="exampleModalLabel"&gt;Response and Trigger&lt;/h5&gt;
              &lt;button type="button" className="close" data-dismiss="modal" aria-label="Close"&gt;
                &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
              &lt;/button&gt;
            &lt;/div&gt;
            &lt;div className="modal-body"&gt;
              &lt;div className="row"&gt;
                &lt;div className="col-lg-6"&gt;
                {
                  Hello
                }
                &lt;/div&gt;
                &lt;div className="col-lg-6"&gt;
                  {value}
                  &lt;button className="btn btn-primary" onClick={()=&gt;this.triggerHandler()}&gt;Trigger&lt;/button&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div className="modal-footer"&gt;
              &lt;button type="button" className="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
   );
  }
  </code></pre>
  
  <p>As described above after receiving the response when i click on close on "X" button the right side should become empty upon closing .</p>