The arrow functions have a performance issues, what should be the best approach to pass event and a parameter to event handler?
For example:
option 1:
<div
onClick={setPerson(name)}
/>
const setPerson = (name) => (e: any): void => {
setPerson(name)
e.stopPropagation()
}
option 2:
<div
onClick={(e) => setPerson(null, name, e)}
/>
const setPerson = (name, e): void => {
setPerson(name)
e.stopPropagation()
}