React - combine string and variable with backtick

0 votes
89 views
added Apr 12, 2021 in React by lcjr First Warrant Officer (9,190 points)
<span>
  {Phone.isMask === true ? (
    <a href="" onClick={e => toglPhone(e)}>
      {maskNumber}
    </a>
  ) : (
    <a href={`tel:${unMaskNumber}`}>{unMaskNumber}</a>
  )}
</span>
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...