-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Task solution #2954
base: master
Are you sure you want to change the base?
Task solution #2954
Conversation
Dominik-Dudek-code
commented
Jan 30, 2025
- DEMO LINK
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. The handling of the highestId
state and the direct mutation of the todosFromServer
array are significant concerns that could impact the functionality of your application. Additionally, the UserInfo
component has a logical error in destructuring the user
prop, which could lead to runtime errors. Please address these issues to ensure your code meets the core requirements. Keep up the great work, and don't hesitate to reach out if you need any help! 😊
✨ 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.
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 your progress! 🚀 While there are a few critical issues that need attention, such as the handling of highestId
state and the direct mutation of todosFromServer
, your implementation shows promise. Here are some key points to address:
-
Handling of
highestId
State:- Ensure that when adding a new todo, the
visibleTodos
state is updated by appending the new todo to the currentvisibleTodos
array, nottodosFromServer
.
- Ensure that when adding a new todo, the
-
Direct Mutation of
todosFromServer
:- Avoid directly mutating
todosFromServer
. UsesetVisibleTodos([...visibleTodos, newTodo])
to manage the list of todos.
- Avoid directly mutating
-
TodoInfo
Component:- If
todo.user
isnull
, thehref
attribute will bemailto:undefined
. Consider adding a fallback value or conditionally rendering the anchor tag only whentodo.user
is notnull
.
- If
-
Form Submission Handling:
- Use the
onSubmit
prop of the form to handle submissions, which is a more standard practice.
- Use the
These improvements will enhance the functionality and maintainability of your code. Keep up the good work and continue learning from these experiences! 💪
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨