Skip to content

Conversation

@diarreola
Copy link

No description provided.

};

ChatLog.propTypes = {
entries: PropTypes.arrayOf(
Copy link

@ilana-adadev ilana-adadev Feb 10, 2023

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 data requirements

src/App.js Outdated
const updateLikedMessage = (id) => {
const allEntries = entryData.map(entry => {
if (entry.id === id) {
return {...entry, likedCount: entry.likedCount + 1};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spread syntax!


// const totalLikes = (entryData) => {
const totalLikes = () => {
const allLikes = entryData.reduce((likeCount, entry) =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice method of calculating total likes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants