Skip to content

Instantly share code, notes, and snippets.

@alexkrolick
Created September 8, 2017 06:50
Show Gist options
  • Save alexkrolick/3f4a0505285b6bbacd2bbbefbffede2a to your computer and use it in GitHub Desktop.
Save alexkrolick/3f4a0505285b6bbacd2bbbefbffede2a to your computer and use it in GitHub Desktop.
class Container extends Component {
state = {
text: 'foo'
}
changeText = newText => this.setState({text: newText})
render() {
<div>
<Presenter1 text={this.state.text} changeText={this.changeText} />
<Presenter2 text={this.state.text} />
<div>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment