title: Axios request on button click
body: <p>Why doesn't this function delete the quiz from the database, when it does work with Postman?</p>
  
  <pre><code> deleteQuiz = () =&gt; {
      const quiz = this.state.quizData._id
       axios.delete(`http://localhost:5000/${quiz}`) 
      .then(res =&gt; {
        console.log(res.data)
  
    })
  </code></pre>
  
  <p>with an onClick:</p>
  
  <pre><code>&lt;button onClick={() =&gt; this.deleteQuiz(this.state.quizData._id)}&gt;Delete Quiz &lt;/button&gt;
  </code></pre>
  
  <p>Similarly, this doesn't work: </p>
  
  <pre><code>topicSearch = topic =&gt; {
      axios.get(`http://localhost:5000/search/${topic}`)
          .then(res =&gt; {
              const data = res.data;
              this.setState({
                  quizSelection: data
              })
          })
       }
  }
  </code></pre>
  
  <p>with an onClick within a child component passing in topicSearch</p>
  
  <pre><code> onClick={this.props.topicSearch}
  </code></pre>
  
  <p>But DOES work when calling topicSearch() inside the onChangeHandler and passing in the e.target.value </p>
  
  <pre><code>handleTopicChange = eventValue =&gt; {
      this.topicSearch(eventValue)
      this.setState({
          topic: topic
      })
  }
  </code></pre>
  
  <p>From other examples it seems that passing state into functions is acceptable - is this something obvious that I am missing?</p>