title: on click i want to generate alert in react js method
body: <p>This is my code:</p>
  
  <pre><code>generateAlert = () =&gt; {
      alert('hi');
  }
  
  return &lt;Tile
      click={(index)=&gt;{this.generateAlert}}
      title={tile.title} 
      value={tile.value}
      key={tile.id}
  /&gt;
  </code></pre>
  
  <p>This is the error I'm getting: </p>
  
  <blockquote>
    <p>Expected an assignment or function call and instead saw an expression  no-unused-expressions
    Search for the keywords to learn more about each error.</p>
  </blockquote>