Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class MyContainer extends Component {
state = {
itemA: 'something',
itemB: 'another thing'
}
_onPress = () => {
// ...
}
_onPinch = () => {
// ...
}
_generateProps = () => ({
...this.props,
...this.state,
onPress: this._onPress,
onPinch: this._onPinch
})
render () {
const props = this._generateProps()
return (
<MyComponent {...props} />
)
}
}
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.