I saw this React onClick handler:
onClick={backToPreviousPage || (() => window.history.back())}
And I can't exactly figure out the logic of the || operator inside this click handler and what does it accomplish. Which function would actually execute on the click if both are defined. Does it tries to execute backToPreviousPage
first, and then window.history.back()
if backToPreviousPage is not defined?