title: How to reload a render in reactjs
body: <p>Hi guys I'm new to Reactjs. And I'm having difficulty in reloading my render when I click the delete button in modal. I want that after click the button , the render should reload without reloading the page. </p>
  
  <p>Here are some of my codes:</p>
  
  <pre><code>render (
     ....
     &lt;button className="btn btn-black btn-myproducts-delete"
  data-toggle="modal" onClick={ this.assignId.bind(null, data.id) }&gt;
  &lt;span className="glyphicon glyphicon-trash"&gt;&lt;/span&gt;
  &amp;nbsp;Delete&lt;/button&gt;
   )
  </code></pre>
  
  <p>My Modal </p>
  
  <pre><code>&lt;Modal isOpen={ this.state.showModal }
              onRequestClose={ this.closeModal }
              style={customStyles}
              contentLabel="Delete"&gt;
              &lt;div className="modal-dialog"&gt;
                  &lt;div className="modal-content"&gt;
                      &lt;div className="modal-header"&gt;
                          &lt;button type="button" className="close" onClick={this.closeModal}&gt;&amp;times;&lt;/button&gt;
                          &lt;h4 className="modal-title"&gt;Delete&lt;/h4&gt;
                      &lt;/div&gt;
                      &lt;div className="modal-body"&gt;
                      &lt;p&gt;Are you sure you want to delete this?
                      You cannot undo this method.&lt;/p&gt;
                      &lt;/div&gt;
                      &lt;div className="modal-footer"&gt;
                      &lt;button type="button" className="btn btn-danger"
                      onClick={this.deleteProduct.bind(null, this.state.productId)}&gt;Delete&lt;/button&gt;
                      &lt;button type="button" className="btn btn-default" onClick={this.closeModal}&gt;
                      Cancel
                      &lt;/button&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;/Modal&gt;
  </code></pre>
  
  <p>and for delete</p>
  
  <pre><code>delete = (idd) =&gt; {
      const { actions } = this.props;
  
      actions.delete(id);
      this.setState({showModal: false});
  
      window.location.reload();
  }
  </code></pre>
  
  <p>what should I do ?</p>