Conversation
alope107
left a comment
There was a problem hiding this comment.
Although this doesn't fully meet the requirements of the project, there's a lot of good code you have here. This is a yellow - you do not need to revisit this project if you do not wish to 🙂 Nice job!
| { | ||
| "python.testing.pytestArgs": [ | ||
| "node_modules" | ||
| ], | ||
| "python.testing.unittestEnabled": false, | ||
| "python.testing.pytestEnabled": true | ||
| } No newline at end of file |
There was a problem hiding this comment.
I don't think these are correct settings - we're not using Python. Also, your individual VS Code settings should not be committed. They should be added to the .gitignore if needed.
| import ChatLog from './components/ChatLog'; | ||
|
|
||
| const App = () => { | ||
| const [chatLogList, setchatLogList] = useState([]); |
There was a problem hiding this comment.
The state should start from the chatMessages, not empty.
| <h1>Application title</h1> | ||
| </header> | ||
| <main> | ||
| <ChatLog chatLogList={chatMessages} /> |
There was a problem hiding this comment.
This should be using the state instead of the messages directly
| const ChatEntry = (props) => { | ||
| const sender = props.sender; | ||
| const senderBody = props.body; | ||
| const timeStamp = props.timeStamp; |
There was a problem hiding this comment.
In the future consider destructuring props in the constructor.
| const sender = props.sender; | ||
| const senderBody = props.body; | ||
| const timeStamp = props.timeStamp; | ||
| const [isLiked, setIsLiked] = useState(false); |
There was a problem hiding this comment.
This type of state should be lifted up
| ChatLog.propTypes = { | ||
| chatLogList: PropTypes.arrayOf( | ||
| PropTypes.shape({ | ||
| id: PropTypes.number.isRequired, | ||
| sender: PropTypes.string.isRequired, | ||
| body: PropTypes.string.isRequired, | ||
| timeStamp: PropTypes.string.isRequired, | ||
| liked: PropTypes.bool.isRequired, | ||
| }) | ||
| ), | ||
| }; |
There was a problem hiding this comment.
Make sure to make the overall array prop as required.
No description provided.