Skip to content

feat: updated person object to be passes as props#3792

Open
thorn086 wants to merge 2 commits into
mate-academy:masterfrom
thorn086:master
Open

feat: updated person object to be passes as props#3792
thorn086 wants to merge 2 commits into
mate-academy:masterfrom
thorn086:master

Conversation

@thorn086

@thorn086 thorn086 commented Jul 5, 2026

Copy link
Copy Markdown

updated person object to be passed as props

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your solution is approved because all core functional requirements are correctly implemented: the Person component renders the right details, App uses it three times with full person objects, married/unmarried logic works, and the optional age field is handled properly. The main noted issue is stylistic: in Person.jsx you combine multiple conditions directly in JSX (like person.isMarried && person.sex === 'm' && (...)), which goes against the checklist recommendation [CHECKLIST ITEM #3] to extract such conditions into named booleans for readability, but this does not break functionality. As a follow-up improvement, consider adding variables like const isMarriedMan = person.isMarried && person.sex === 'm';, const isMarriedWoman = person.isMarried && person.sex === 'f';, and const isNotMarried = !person.isMarried; above the JSX and then using {isMarriedMan && ...}, etc. Also remember to include the required demo link in your PR description (e.g. https://<your_github>.github.io/react_person/) so reviewers can quickly verify behavior. Overall, you met the task’s behavioral requirements well; refining the conditional rendering style will make your code cleaner and closer to the checklist expectations.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment thread src/App.jsx
Comment thread src/components/Person/Person.jsx Outdated
Comment thread src/components/Person/Person.jsx Outdated
Comment thread src/components/Person/Person.jsx Outdated
@thorn086

thorn086 commented Jul 5, 2026

Copy link
Copy Markdown
Author

updated comments

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