title: How to do ajax delete on react
body: <p>I was wondering if delete works like add but it doesn't. Im using fetch method Im not familiar on react's ajax so I am not clearly sure whats wrong with my code </p>
  
  <p>so here is my code onclick delete</p>
  
  <pre><code>deleteEmployee(id) {
    jQuery.support.cors = true;
      fetch('http://localhost:5118/api/employeedetails/DeleteEmployeeDetail/'+ id, {
           method: 'GET'
    }).then(function(response) {
       // history.go(0);
        var jsonReturnedValue = [...this.state.jsonReturnedValue]; 
        this.setState({jsonReturnedValue})
    }).catch(function(err) {
      // Error :(
    });
  }
  </code></pre>
  
  <p>this is the code for the table </p>
  
  <pre><code>&lt; div className="container"&gt;   
            &lt;h1&gt; Listof Employees &lt;/h1&gt;
              &lt;button className ='btn btn-warning right ' data-toggle="modal" data-target="#AddEmployee"&gt; Add an Employee&lt;/button&gt;
               &lt;table className= "table table-bordered" id="result"&gt; 
                  &lt;tbody&gt;
                   &lt;tr&gt;
                        &lt;th&gt;ID&lt;/th&gt;
                        &lt;th&gt;Name&lt;/th&gt;
                        &lt;th&gt;Address&lt;/th&gt;
                        &lt;th&gt;Update&lt;/th&gt;
                        &lt;th&gt;Delete&lt;/th&gt;
                   &lt;/tr&gt;
                      {jsonReturnedValue.map((d,i) =&gt; this.renderItem(d,i))}
                  &lt;/tbody&gt;
  
              &lt;/table&gt;
            &lt;/div&gt;
  </code></pre>
  
  <p>code for the calling of the data where the button located</p>
  
  <pre><code>renderItem(d, i) {
    return &lt;tr key={i} &gt;
      &lt;td&gt; {d.Employee_ID} &lt;/td&gt;
      &lt;td&gt;{d.Employee_Name}&lt;/td&gt;
      &lt;td&gt;{d.Address }&lt;/td&gt; 
      &lt;td&gt;&lt;center&gt;&lt;button className ="btn btn-info" onClick={this.handleOnclick.bind(this,  d.Employee_ID, d.Employee_Name, d.Address , d.Department)}   data-toggle="modal" data-target="#UpdateEmployee"&gt;Edit&lt;/button&gt;&lt;/center&gt;&lt;/td&gt;
      &lt;td&gt;&lt;center&gt;&lt;input type="submit" className ="btn btn-danger" onClick={this.deleteEmployee.bind(this,  d.Employee_ID)}  value="Delete"/&gt;&lt;/center&gt;&lt;/td&gt;
   &lt;/tr&gt;
  }
  </code></pre>
  
  <p>PS:
  the code itself is working so the console says nothing is wrong but i want it when i click it the table reloads</p>