score:0

const [likes, setLikes] = useState([]);

  useEffect( async () => {

    const query = await getDevsApi(); 
    const likes = query.map(like => like.upvotes); 

    setLikes(likes)

  },[]);
return (
...
  <span className={styles.iconLeft}>
    { likes?.map(like => <a href="#" onClick={addLike} ><small>{like} Likes  
      <FontAwesomeIcon className={styles.columnIcon} icon={faHeart} /></small> </a> 
    }
  </span>
)

Related Query

More Query from same tag