title: how to write onClick (with arguments) optimized by useCallback in React?
body: <p>I need to implement a long list, each item in the long list will trigger a new function when onClick, because this function is unchanged every time it is rendered, so I want to use useCallback to optimize it, this returned function Fn needs to pass in parameters, so should I use bind to pass parameters in onClick?</p>
  <pre><code>    const func = useCallback((num) =&gt; setIndex(num), [])
      // myComponent
      &lt;TableItem onClick = { func.bind(null, index) } /&gt;
  </code></pre>
  <p>This is my first question, please forgive me if something is wrong，Thanks.</p>