Last active
September 28, 2019 20:03
-
-
Save mitchgollub/95c53a75b365a298460777742ae6f3e1 to your computer and use it in GitHub Desktop.
React: High Order Components 4
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
const Profile = ({ name }) => ( | |
<div> | |
<div>Name: {name}</div> | |
</div> | |
); | |
Profile.propTypes = { | |
name: string | |
}; | |
const ProfileWithRenamedUsername = renameProp('username', 'name')(Profile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment