title: React Hooks and jsx-no-lambda warning
body: <p>so now that we cant use the hooks as old style of event functions beside disabling the warning what is the best way to call event function that does not violate the rule</p>
  
  <pre><code>import React, { useState } from 'react';
  
  function Example() {
    // Declare a new state variable, which we'll call "count"
    const [count, setCount] = useState(0);
  
    return (
      &lt;div&gt;
        &lt;p&gt;You clicked {count} times&lt;/p&gt;
        &lt;button onClick={() =&gt; setCount(count + 1)}&gt; // Lambdas are forbidden in JSX attributes due to their rendering performance impact (jsx-no-lambda)
          Click me
        &lt;/button&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>