Skip to content

Instantly share code, notes, and snippets.

@ernestofreyreg
Last active June 19, 2018 20:36
Show Gist options
  • Save ernestofreyreg/783ec94e692eda3f5c2a72ad73ecabed to your computer and use it in GitHub Desktop.
Save ernestofreyreg/783ec94e692eda3f5c2a72ad73ecabed to your computer and use it in GitHub Desktop.
class Connected extends React.PureComponent {
constructor (props, context) {
super(props, context)
this.blah = createNewBlah()
}
componentWillWhatever() {
// Do anything here
}
render () {
return React.createElement(this.props.children, { blah: this.blah })
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment