Skip to content

Instantly share code, notes, and snippets.



Last active Dec 10, 2017
What would you like to do?
HoC with custom prop name
export default class App extends PureComponent...
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