-
Notifications
You must be signed in to change notification settings - Fork 625
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
Kate - C18 - Lions #47
base: main
Are you sure you want to change the base?
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.
Excellent job! There's a comment below on a place to make things simpler. Great job!
const senderReceiver = | ||
sender === user1 ? 'chat-entry remote' : 'chat-entry local'; |
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.
Great job on doing this optional enhancement!
setChatData(newChatEntries); | ||
} | ||
}; | ||
const countLikes = () => { |
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.
Instead of counting all of likes each time, it would work to keep the number of likes in state. Each time the like button is pressed, that count can go up by one or down by one.
return { ...chatentry }; | ||
}); | ||
|
||
const [chatData, setChatData] = useState(initialCopy); |
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.
Great job keeping track of state!
chat log
bot v bot