-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 #2710
base: master
Are you sure you want to change the base?
add task solution #2710
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.
Great job on implementing the task requirements! 🎉 The Person
component is well-designed to handle optional properties like age
and partnerName
, ensuring flexibility. The code meets all the core requirements, and the use of destructuring and conditional rendering is spot on. Keep up the good work! If you want to further enhance your code, consider adding default values or handling for missing properties to make it even more robust. 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
const olya = { | ||
name: 'Olya', | ||
sex: 'f', | ||
isMarried: true, | ||
partnerName: 'Maksym', | ||
}; |
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 olya
object is missing the age
property. Ensure that the Person
component can handle objects without an age
property or add an age
property to olya
.
const alex = { | ||
name: 'Alex', | ||
age: 25, | ||
sex: 'm', | ||
isMarried: false, | ||
}; |
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 alex
object is missing the partnerName
property. Ensure that the Person
component can handle objects without a partnerName
property or add a partnerName
property to alex
.
DEMO LINK