Skip to content

Instantly share code, notes, and snippets.

@mohandere mohandere/hoc-ppHOC.js
Last active May 7, 2019

Embed
What would you like to do?
Higher Order Components
const propsProxyHOC = (WraapperComponent) => {
return class extends React.Component {
state = {
count: 0
}
render() {
// Pass thru the props that the HOC receives
return <WraapperComponent {...this.props} {...this.state} />
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.