score:0

Accepted answer
if (newMessagesArray.length > 0) {
      return (
      newMessagesArray = newMessagesArray.map((item) =>
        <li key={item.id}>Subject = {item.message_Subject.subject}</li>
        <li> etc..... </li>
        ))
    } else {
      return <p>No New messages.</p>;
    };

Related Query

More Query from same tag