Add task solution#3756
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation successfully meets all functional requirements for the React Person component. The code correctly destructures props, conditionally renders age and partner information, and displays appropriate messages based on marital status. Regarding the code style note: while checklist item #3 suggests extracting the sex === 'm' conditional into a separate variable for improved readability, this is a minor code quality suggestion rather than a functional blocker. Your code works correctly and produces the expected output for all test cases. This type of refactoring is something that will come naturally with experience, and you're encouraged to revisit it as a learning exercise in code organization. The implementation demonstrates solid understanding of React fundamentals, including props destructuring, conditional rendering, and proper component composition. Great work on meeting all the core requirements!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| {sex === 'm' | ||
| ? `${partnerName} is my wife` | ||
| : `${partnerName} is my husband`} |
There was a problem hiding this comment.
This violates checklist item #3: Avoid putting several cases to conditional rendering. Create a separate variable for the sex === 'm' condition and use it in the JSX instead.
[DEMO LINK](https://botqqku.github.io/react_person/