-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Develop #1523
base: master
Are you sure you want to change the base?
Develop #1523
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.
src/App.jsx
Outdated
<Person | ||
person={misha} | ||
/> |
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.
There is no need to split it into several lines when there are fewer than 3 props
<Person | |
person={misha} | |
/> | |
<Person person={misha} /> |
src/Person.jsx
Outdated
My name is | ||
{' '} | ||
{name} |
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.
Consider using Template literals for better readability
src/Person.jsx
Outdated
<p className="Person__age"> | ||
{age && ( |
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.
Don't render this element if there is no age
<p className="Person__age"> | |
{age && ( | |
{age && ( | |
<p className="Person__age"> |
src/Person.jsx
Outdated
const { name, age, sex, isMarried, | ||
partnerName = 'I am not married' } = person; |
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 partnerName should be a name. You can create a separate variable for a partner and assign a value here
const { name, age, sex, isMarried, | |
partnerName = 'I am not married' } = person; | |
const { | |
name, | |
age, | |
sex, | |
isMarried, | |
partnerName | |
} = person; |
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.
You've got this, keep pushing forward!
https://Hanna-Balabukha.github.io/react_person/