Last active
October 1, 2019 09:32
-
-
Save roeib/5049729ab5984ce004cb39c71f87f435 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'; | |
class User extends React.Component { | |
render() { | |
return ( | |
<div> | |
<p>User Name: {this.props.name}</p> | |
<p>Age: {this.props.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