React : can't find a way to pass data and function

I want to make a function that changes display on click but I’m not able to find a way to pass id of the button and then function to change state of display