Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save virajkulkarni14/c56b012f898bc605dd1d0c9c40f361da to your computer and use it in GitHub Desktop.

Select an option

Save virajkulkarni14/c56b012f898bc605dd1d0c9c40f361da to your computer and use it in GitHub Desktop.
import React from "react";
import PropTypes from "prop-types";
const UserCard = ({ user }) => {
return (
<ul>
<li>{user.name}</li>
<li>{user.age}</li>
<li>{user.email}</li>
</ul>
);
};
UserCard.propTypes = {
user: PropTypes.object
};
UserCard.defaultProps = {
user: {}
};
export default UserCard;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment