Home > Mobile >  JSX condition that does not work with React
JSX condition that does not work with React

Time:05-16

I just started React and I'm facing a problem: when I run this piece of code, nothing is displayed.

const plantList = {
    name: 'monstera',
    category: 'classique',
    id: '1ed',
    isBestSale: true
};

function Notes(){
    plantList.map((plant) => (
    <li key={ plant.id }>
        {plant.isBestSale ? <span>           
  • Related