-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lions - Jessica A. #115
base: main
Are you sure you want to change the base?
Lions - Jessica A. #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
const App = () => { | ||
const [chatLogList, setchatLogList] = useState([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state should start from the chatMessages
, not empty.
return ( | ||
<div id="App"> | ||
<header> | ||
<h1>Application title</h1> | ||
</header> | ||
<main> | ||
<ChatLog chatLogList={chatMessages} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to make the overall array prop as required.
No description provided.