title: How can I delete a row on fetch reactjs
body: <p>this is the part where i the table from the api </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)}   data-toggle="modal" data-target="#UpdateEmployee"&gt;Edit&lt;/button&gt;&lt;/center&gt;&lt;/td&gt;
              &lt;td&gt;&lt;center&gt;&lt;button className ="btn btn-danger" onClick={this.deleteEmployee.bind(this, d.Employee_ID)} &gt;Delete&lt;/button&gt;&lt;/center&gt;&lt;/td&gt;
       &lt;/tr&gt;
      }
  
      handleOnclick(id,name,address) {
        debugger
  
       this.setState({
          Employee_Name: name,
          Address: address,
        });
        }
      }
  </code></pre>
  
  <p>So i tried using this on deleting a row however im not sure where or how did i got wrong please help i really don't know how </p>
  
  <pre><code>  onDelete(id) {
          deleteEmployeet(id)
               .then((data) =&gt; {
                let  jsonReturnedValue = this.state.Employee_Name.filter((post) =&gt; {
                  return id !== post.id;
                      });
  
                      this.setState(state =&gt; {
                          state.Employee_Nam = Employee_Nam;
                          return state;
                      });
                  })
                  .catch((err) =&gt; {
                      console.error('err', err);
                  });
          }
      export function deleteBlogPost(id) {
          return fetch('http://localhost:5118/api/employeedetails/deleteemployeedetails/' + id, {
              method: 'DELETE',
              mode: 'CORS'
          }).then(res =&gt; res)
          }).catch(err =&gt; err);
      }
  </code></pre>
  
  <p>this is where i render it a place where i render my code on reactjs</p>
  
  <pre><code>render() {
  
    let {jsonReturnedValue} = this.state;
  
  return(
    &lt;div&gt;
        &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"&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>