title: Is calling componentDidMount within a function bad practice?
body: <p>I have a function in my ReactJS app that sends an axios POST request to the server to delete a certain element from my database.</p>
  
  <p>Basically, I have a list and I can delete certain items from it, however, React only displays the changes made by deleting an element after refreshing the page.</p>
  
  <p>Here is the delete function that I use: </p>
  
  <pre><code>handleDelete (event) {
      var id = event.target.id;
      axios.get('todos/delete?id='+id)
          .then(function(response) {
          });
      this.componentDidMount();
  }
  </code></pre>
  
  <p><code>componentDidMount()</code> fetches data from my database and stores it in the state.
  I found that, if I call <code>componentDidMount</code> within the function, that it displays the changes right away, however, I kind of feel like that's a rather unprofessional way of doing what I'm trying to achieve.
  Therefore my questions are:</p>
  
  <ul>
  <li>Is it considered bad practice to call a lifecycle method within another function?</li>
  <li>Is there a better way to get the page to display the changes right away?</li>
  </ul>