Last active
November 21, 2018 00:33
-
-
Save ReidWilliams/47f2fa173fdfdaf2f0c9a46032b27085 to your computer and use it in GitHub Desktop.
React Container Pattern Template
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
import React from 'react' | |
const createContainer = (ComposedComponent) => { | |
class Container extends React.Component { | |
render() { | |
const componentProps = { | |
...this.props | |
} | |
return ( | |
<ComposedComponent {...componentProps} /> | |
) | |
} | |
} | |
return Container | |
} | |
export default createContainer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment