I have a React component where I am passing onClick function. I originally just had button.onClick, but I need to check if isBannerClickable is false before setting this. If isBannerClickable === true, then I don't want to set onClick.
Is it possible to simplify or clean this onClick prop?
onClick={!!isBannerClickable === false ? button.onClick : null}