Skip to content

Instantly share code, notes, and snippets.

@roeib
Last active October 1, 2019 09:32
Show Gist options
  • Save roeib/5049729ab5984ce004cb39c71f87f435 to your computer and use it in GitHub Desktop.
Save roeib/5049729ab5984ce004cb39c71f87f435 to your computer and use it in GitHub Desktop.
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