Skip to content

Instantly share code, notes, and snippets.

@hai5nguy
Created November 4, 2016 15:35
Show Gist options
  • Save hai5nguy/63b216b795a845400de7b0e737c70e18 to your computer and use it in GitHub Desktop.
Save hai5nguy/63b216b795a845400de7b0e737c70e18 to your computer and use it in GitHub Desktop.
//parent.js
export default class Parent extends React.Component {
render() {
var somePropFromStore = this.prop.somePropFromStore
return <Child />
}
}
//child.js
export default class Child extends React.Component {
clicked = (e) => {
dispatch(someActionHere())
}
render() {
return <div onClick={this.clicked}>I am child</div>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment