Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object.key

 <div>
      {Object.keys(product).length === 0 ? (
        <div>Loading Data from api</div>
      ) : (
        <div style={{ width: "600px" }}>
          <img src={product.image} width="200px" alt="no data found" />
          <h4>{title}</h4>
          <h4>{category}</h4>
          <h4>{description}</h4>
          <h4>{id}</h4>
        </div>
      )}
    </div>
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+8 =