title: When to use inline function on button onClick event - Javascript/React.js
body: <p>I can see different style of assigning event handler to the button <code>onClick</code> event. Can anyone suggest when to use inline function on button <code>onClick</code> event handler?</p>
  
  <pre><code>onClick={props.handleDeleteOption(props.optionText)}; // Call the handler directly
  
  onClick={(e) =&gt; {
            props.handleDeleteOption(props.optionText);
          }} // Call the handler through inline-function
  </code></pre>