React Js best practice - onClick event
Solution 1:
Using an arrow function in render creates a new function each time the component renders, which may break optimizations based on strict identity comparison.
(From React documentation: https://reactjs.org/docs/faq-functions.html)
Thus, you should go 1st scenario.