Last active
December 10, 2017 17:37
-
-
Save brunolemos/d53a58b10ffd5a934468cb087051aa2b to your computer and use it in GitHub Desktop.
HoC with custom prop name
This file contains hidden or 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
@withTest('myNewPropName') | |
export default class App extends PureComponent... |
This file contains hidden or 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
export default (propName = 'myDefaultProp') => Component => props => ( | |
<Component {...props} {...{ [propName]: 123 }} /> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment