-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
done task #2698
base: master
Are you sure you want to change the base?
done task #2698
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.
Great job on implementing the Person
component! 🎉 The code meets all the task requirements and handles conditional rendering effectively. While the component is well-structured, consider adding default values or handling undefined properties to make it even more robust. Keep up the excellent work! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import './App.scss'; | |||
import { Person } from './components/Person/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.
Ensure that the Person
component is implemented to handle cases where certain properties might be missing, such as age
in the olya
and alex
objects. Consider providing default values or handling undefined values within the Person
component.
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.
Good work 👍
Approved, but left a comments and don't forget to add a demo link so a reviewer can test your solution
{person.age ? ( | ||
<p className="Person__age"> {`I am ${person.age}`} </p> | ||
) : null} |
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.
{person.age ? ( | |
<p className="Person__age"> {`I am ${person.age}`} </p> | |
) : null} | |
{person.age && ( | |
<p className="Person__age"> {`I am ${person.age}`} </p> | |
)} |
You don't need to use ternary operator if you return nothing in the second case
No description provided.