I have on component which is stateless and it is used in both parent component
<div onClick={() => handleClick()}><div>
I have to add handle click function but only for one of them. I have one bool variable which is responsible for that e.g. shouldHandleClick.
So I need to write something like but it works for cases with props, strings etc. etc.
<div {shouldHandleClick ? onClick={() => handleClick()} : null}><div>
Do you have any ideas otherwise i will handle click in the second component which doesn`t need this handle click function