title: How to create a popup on click delete button with ReactJS?
body: <p>I want when I click on button delete, it opens a popup of confirmation.
  I try to use a <code>sweetAlert</code>, but it's not showing any popup. </p>
  
  <p><strong>popupdel method :</strong></p>
  
  <pre><code> popupdel() {
      swal({
        title: "Are you sure?",
        text: "Your will not be able to recover this imaginary file!",
        type: "warning",
        showCancelButton: true,
        confirmButtonClass: "btn-danger",
        confirmButtonText: "Yes, delete it!",
        closeOnConfirm: false
      }, function() {
        swal("Deleted!", "Your imaginary file has been deleted.", "success");
      });
    }
  </code></pre>
  
  <p><strong>delete method :</strong></p>
  
  <pre><code>delete(Code) {
  
  axios.delete('http://localhost:4000/app/deleteclient/' + Code).then(function(clients) {
  
  this.setState({ clients: clients.records });
  
  }.bind(this));
  
  }
  
  &lt;button style={btn} onClick={(Code) =&gt; this.delete(client.Code)} type="button"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;&lt;/button&gt;
  </code></pre>
  
  <p>How can I make the popup showing on click button ? </p>