Skip to content
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

solution #2631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

solution #2631

wants to merge 1 commit into from

Conversation

Krykunov
Copy link

Copy link

@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.

Great job on completing the task! 👏 Your code is correct and doesn't violate any task requirements. However, there's a minor code style issue related to the destructuring of the person prop. It's not a big deal, but it's always good to strive for cleaner and more readable code. Keep up the good work! 🚀

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

@@ -1 +1,13 @@
// export const Person = ({ person }) => ();
export const Person = ({ person }) => (

Choose a reason for hiding this comment

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

[CODE STYLE] Instead of accessing the properties of person directly inside the JSX, you could destructure the person object at the beginning of the function body. This will make your code cleaner and more readable. Here's a hint on how you can do this:

jsx
export const Person = ({ person }) => {
const { name, age, isMarried, partnerName, sex } = person;
...
};

Or even better, you can destructure `person` right in the function parameters:

```jsx
export const Person = ({ person: { name, age, isMarried, partnerName, sex } }) => {
  ...
};

Remember, readability is everything.

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