React - if data exist or present, show this div

0 votes
68 views
added Sep 14, 2022 in React by lcjr First Warrant Officer (9,190 points)
{!!enterprise_service && (
  <div className="show">
  // if enterprise_service data exist, show this div
  </div>
)}

 

{coworkAmenities.length > 0 && (
  <div className="show">
    // if coworkAmenities data present even 1, show this div
  </div>
)}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...