title: Delete request in React
body: <p>I have a List on my page that display all registered users from a collection in Mongodb and Now i have created an Admin Panel that I want to be able to delete users with the click of a button but I have no clue about how to construct such a function.</p>
  
  <p>This is the component that renders users:</p>
  
  <pre><code>class UsersList extends React.Component {
  constructor(props) {
    super();
    this.state = {
      usersData: []
    };
  }
  
  
  componentDidMount() {
      fetch('http://localhost:3003/api/inlogg').then(function (response) {
        return response.json();
      }).then(function (result) {
        this.setState({
          usersData: result
        });
        }.bind(this))
    }
  
    render () {
      return this.state.usersData.map(function (user) {
                  return &lt;div className="dropdown" key={user._id}&gt;
                    &lt;li&gt;{user.userName}&lt;/li&gt;
                    &lt;div className="dropdown-content"&gt;&lt;Link to={"/privatchatt/"+user.userName+"/"+sessionStorage.getItem("username")} target="_blank"&gt;&lt;p&gt;Starta privatchatt med {user.userName}&lt;/p&gt;&lt;/Link&gt;
                      &lt;button className="delete-btn"&gt;Delete&lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;;
                }
              )
            }
          }
  </code></pre>
  
  <p>Here is my express delete route (Its working with postman, also "users" is the collection name)</p>
  
  <pre><code>    app.delete('/api/users/delete/:id', (req, res, next) =&gt; {
    users.deleteOne({ _id: new ObjectID(req.params.id) }, (err, result) =&gt; {
      if(err){
        throw err;
      }
      res.send(result)
    });
  });
  </code></pre>
  
  <p>This is what is in my db:</p>
  
  <pre><code>{ "_id" : ObjectId("5b6ece24a98bf202508624ac"), "userName" : "admin", "passWord" : "admin" }
  { "_id" : ObjectId("5b6edb95fbbd8420e4dd8d20"), "userName" : "Admin", "passWord" : "Admin" }
  { "_id" : ObjectId("5b6eea7f0becb40d4c832925"), "userName" : "test4", "passWord" : "test4" }
  </code></pre>
  
  <p>So what i want to create a fetch delete request that goes off when i press a delete button from my React front-end</p>