-
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
Solution #1400
base: master
Are you sure you want to change the base?
Solution #1400
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.
good job!
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.
Thank you for your hard work on this project! 😊 There are a few critical issues that need to be addressed before we can approve the pull request. Specifically, the PostList.jsx
file is missing a key
prop in the PostInfo
component, which is essential for React's reconciliation process. Additionally, the task requires moving styles from App.scss
to component-specific files, which hasn't been fully implemented. Please address these issues to ensure your code meets the task requirements. Keep up the great work, and feel free to reach out if you have any questions! 🚀
✨ 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.
src/components/PostList/PostList.jsx
Outdated
{posts.map(post => ( | ||
<PostInfo post={post} /> |
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.
Each child in a list should have a unique key
prop to help React identify which items have changed, are added, or are removed. Consider adding a key
prop to the PostInfo
component, using a unique identifier from the post
object, such as post.id
.
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.
Review Summary
Great job on addressing the previous issues and making significant improvements to your code! 🎉
Your solution now meets the task requirements, particularly with the inclusion of the key
prop in PostList.jsx
, which is crucial for React's reconciliation process. Additionally, you've successfully moved styles from App.scss
to component-specific files, ensuring a more modular and maintainable codebase.
However, there are a few areas to focus on for future enhancements:
- Component-Specific Styles: Ensure that all styles are moved to component-specific files using CSS modules. For instance, rename files like
UserInfo.scss
,PostInfo.scss
, andCommentList.scss
toUserInfo.module.scss
,PostInfo.module.scss
, andCommentList.module.scss
, respectively, and update the imports in the corresponding components.
These changes are essential for maintaining a clean and organized code structure. While the current implementation is approved to help you progress in your learning journey, addressing these points will enhance your skills and code quality.
Keep up the great work, and continue to learn from these experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -1,104 +1,20 @@ | |||
import './App.scss'; |
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.
The task requires moving styles from App.scss
to component-specific files. Consider creating a new file, such as App.module.scss
, and moving the styles there. Then, import the new file here.
export const CommentList = () => <>Put the list here</>; | ||
import { CommentInfo } from '../CommentInfo/CommentInfo'; | ||
|
||
import './CommentList.scss'; |
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.
The task requires moving styles from CommentList.scss
to component-specific files. Consider creating a new file, such as CommentList.module.scss
, and moving the styles there. Then, import the new file here.
@@ -1 +1,7 @@ | |||
// add styles here | |||
.CommentList { |
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.
To comply with the task requirements, rename this file to CommentList.module.scss
and update the import in CommentList.jsx
to use CSS modules.
import { CommentList } from '../CommentList'; | ||
import { UserInfo } from '../UserInfo'; | ||
|
||
import './PostInfo.scss'; |
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.
The task requires moving styles from PostInfo.scss
to component-specific files using CSS modules. Consider creating a new file, such as PostInfo.module.scss
, and moving the styles there. Then, import the new file here.
@@ -1 +1,16 @@ | |||
// add styles here | |||
.PostInfo { |
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.
To comply with the task requirements, rename this file to PostInfo.module.scss
and update the import in PostInfo.jsx
to use CSS modules.
@@ -1 +1,7 @@ | |||
export const UserInfo = () => <>Put the user here</>; | |||
import './UserInfo.scss'; |
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.
The task requires moving styles from UserInfo.scss
to component-specific files using CSS modules. Consider creating a new file, such as UserInfo.module.scss
, and moving the styles there. Then, import the new file here.
@@ -1 +1,3 @@ | |||
// add styles here | |||
.UserInfo { |
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.
To comply with the task requirements, rename this file to UserInfo.module.scss
and update the import in UserInfo.jsx
to use CSS modules.
https://nataliia-v.github.io/react_static-list-of-posts-js/