onClick={someFunction} VS onClick={()=>someFunction}
🔗 https://dev.to/itric/onclicksomefunction-vs-onclicksomefunction-5d1i
Using `onClick={someFunction}` directly references the function and executes it on click without creating an extra function, making it more efficient for simple handlers. In contrast, `onClick={() => someFunction()}` creates a new function on each render, ideal for scenarios where arguments need to be passed or additional operations are required before executing the function.
🔗 https://dev.to/itric/onclicksomefunction-vs-onclicksomefunction-5d1i