Conversation
tgoslee
left a comment
There was a problem hiding this comment.
Great job Hope! Your app looks good and meets the requirements. I saw in learn that you were getting some console errors. I left some feedback on how to fix them. Let me know if you have any questions.
| ChatLog.propTypes = { | ||
| //Fill with correct proptypes | ||
| entries: PropTypes.arrayOf(PropTypes.object).isRequired, | ||
| update: PropTypes.func.isRequired, |
There was a problem hiding this comment.
In Learn, I'm sure that you saw a console error for the update prop. Because your update prop was not in the original project you can handle this error by making the update prop a required prop or you can update the tests to look for update as well as entries.
| sender: PropTypes.string.isRequired, | ||
| body: PropTypes.string.isRequired, | ||
| timeStamp: PropTypes.string.isRequired, | ||
| liked: PropTypes.bool.isRequired, |
There was a problem hiding this comment.
Same here. The original prop types that the test is looking for are sender, body, and timeStamp. If you added your own you can either make them not required or update the test to account for the added prop types.
| //Mapping each entry of chatMessages array to a chatEntry react component | ||
| return ( | ||
| <ChatEntry | ||
| key={entry.id} /* //Look up react keyError */ |
There was a problem hiding this comment.
you could use the index from map as the key to see if it fixes the error
return entries.map((entry , i) => ...
<ChatEntry
key={i}...| setUpdateChatLog(newChatData); | ||
| }; | ||
|
|
||
| const likeCount = updateChatLog.reduce((total, entry) => { |
No description provided.