Last active
October 1, 2019 10:15
-
-
Save roeib/b4822727e2f22b81bd3ec21af6c74adb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { PropTypes } from 'prop-types'; | |
const User = ({ name,age })=> { | |
return ( | |
<div> | |
<p>User Name: {name}</p> | |
<p>Age: {age}</p> | |
</div> | |
); | |
} | |
User.propTypes = { | |
name: PropTypes.string, | |
age: PropTypes.number | |
}; | |
export default User; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment