function Mailbox(props) {
        const unreadMessages = props.unreadMessages;
        return (
            {unreadMessages.length > 0 &&
                You have {unreadMessages.length} unread messages.
      const messages = ['React', 'Re: React', 'Re:Re: React'];
        <Mailbox unreadMessages={messages} />,

      Javascript language logoOperators

      The Mailbox component will keep track of the number of unread messages in its props.unreadMessages property. When rendered, the component will display a header that says "Hello! You have {unreadMessages.length} unread messages." The unreadMessages property will contain an array of strings, each of which corresponds to a different message.


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.