For readability you should most of the time keep the state mutation in the callback function. What the button click does should be on the top level of the component using it not hidden in the button itself. I would use 'onClick' prop for the button, and then use function to handle it in the 'Home'. This way you don't have to go into the button implementation to understand the side effect.