-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add task solution #1460
base: master
Are you sure you want to change the base?
add task solution #1460
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.
Hey! 👋 The code looks great overall and follows the task requirements well. However, there's a small issue with the key
prop in src/App.jsx
. According to the checklist, the key
should be added to the root tag inside the iteration within the PostList
component, not passed to the PostList
component itself. Could you please adjust that? Once that's fixed, I'll be happy to approve! 👍 You are almost there!
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
🤖 If you have any comments about this review, please leave a message in the Add a comment field below and mention me with @mateacademy-ai-mentor
tag. I will read your message when I perform the next review of your pull request.
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.
Okay, the review is complete! 🎉 The code has been approved to help you move forward, but there are a few things we need to address to make it even better.
Specifically, the key
prop placement needs adjustment. Currently, in src/App.jsx
, the key
prop is being passed to the PostList
component. However, according to the checklist and previous feedback, the key
should be added to the root element inside the iteration within the App
component. This means the key
should be on the first tag directly after the .map
call. Also, the checklist states "DON't add keys to any other tags" so the key should be removed from the PostList
component.
In CommentList.jsx
, the key
prop needs to be moved to the root div
element within the CommentInfo
component. This ensures that React can efficiently update the list when items are added, removed, or reordered.
Remember, the key
prop helps React identify which items have changed, been added, or been removed in a list. It should be unique among its siblings. More info can be found in the official React documentation: https://reactjs.org/docs/lists-and-keys.html
Keep up the great work! 💪
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
{comments.map(comment => ( | ||
<CommentInfo key={comment.id} comment={comment} /> |
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.
According to the checklist, the key
prop should be added to the root tag inside the iteration (the first tag after the .map
call). In this case, it should be moved to the div
element within the CommentInfo
component.
No description provided.