Created
November 4, 2016 15:35
-
-
Save hai5nguy/63b216b795a845400de7b0e737c70e18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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