title: React functional component, how to re-render after data is removed
body: <p>Trying to remove an item from the database from a list view with a button.</p>
  
  <p>The data gets removed on click, but the component isnt removed from the page.</p>
  
  <p>How should I go about making it re-render after its removed?</p>
  
  <p>I an not using redux for this</p>
  
  <pre><code>const EmailItem = ({email}) =&gt; (
  
    &lt;div&gt;
      &lt;h3&gt;{email}&lt;/h3&gt;
      &lt;button
        onClick={(e) =&gt; {
        e.preventDefault()
        axios.delete("/api/emails/delete/", {
          data: {email: email}
        })
        }
      }
      &gt;
        Remove
    &lt;/button&gt;
    &lt;/div&gt;
  )
  </code></pre>
  
  <p>export default (EmailItem)</p>