Skip to content

Add task solution#3756

Open
botqqku wants to merge 1 commit into
mate-academy:masterfrom
botqqku:develop
Open

Add task solution#3756
botqqku wants to merge 1 commit into
mate-academy:masterfrom
botqqku:develop

Conversation

@botqqku
Copy link
Copy Markdown

@botqqku botqqku commented Jun 1, 2026

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

Comment on lines +15 to +17
{sex === 'm'
? `${partnerName} is my wife`
: `${partnerName} is my husband`}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants