-
Notifications
You must be signed in to change notification settings - Fork 153
Ocelots - Megan Maple #136
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ChatEntry.propTypes = { | ||
| //Fill with correct proptypes | ||
| id: PropTypes.number, |
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.
Nice use of propTypes to control variable requirements
src/components/ChatEntry.js
Outdated
| }; | ||
|
|
||
| const ChatEntry = ({ id, sender, body, timeStamp, liked }) => { | ||
| const [isliked, setLiked] = useState(liked); |
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.
nice use of useState to track changes
src/App.js
Outdated
| import ChatLog from './components/ChatLog.js'; | ||
|
|
||
| const App = () => { | ||
| const likeCount = chatMessages.reduce((a, obj) => { |
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.
a clever use of reduce to count
No description provided.