Skip to content

Conversation

@AlexaCoffman
Copy link

No description provided.

Copy link

@kaidamasaki kaidamasaki left a comment

Choose a reason for hiding this comment

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

Great job!

I left one note about semantic HTML but everything else looks good.

Well done!

import ChatLog from './components/ChatLog';
import chatMessages from './data/messages.json';

let totalLikes = 0;

Choose a reason for hiding this comment

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

totalLikes should have been stored in a useState variable.

When you update state in React it triggers a re-render automatically. Updating a global variable won't. (Also if you instantiated the app twice on the same page you'd be in trouble.)

<h1>Application title</h1>
<h1>Chat between Vladimir and Estragon</h1>
<section className="header section">
<h4 id="heartWidget" className="widget">

Choose a reason for hiding this comment

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

Remember, the h1, h2, etc. elements should be used to denote the structure of the page (you should be able to build a table of contents).

If you want to change the size of text you should use CSS.

Comment on lines +9 to +18
<section>
<ChatEntry
id={chatEntry.id}
sender={chatEntry.sender}
body={chatEntry.body}
timeStamp={chatEntry.timeStamp}
liked={chatEntry.liked}
onUpdate={props.onUpdateEntry}
></ChatEntry>
</section>

Choose a reason for hiding this comment

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

This extra section doesn't hurt anything but isn't required, FYI.

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