Skip to content

Instantly share code, notes, and snippets.

@ReidWilliams
Last active November 21, 2018 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ReidWilliams/47f2fa173fdfdaf2f0c9a46032b27085 to your computer and use it in GitHub Desktop.
Save ReidWilliams/47f2fa173fdfdaf2f0c9a46032b27085 to your computer and use it in GitHub Desktop.
React Container Pattern Template
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