-
-
Save jhfgloria/633b2099cc1cdf6219b90dfe5073b78a 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
| class MyChildComponent extends PureComponent { | |
| render() { | |
| this.props.callback('Hello World') | |
| console.log('Proof that I\'m always re-rendering') | |
| // return something to render | |
| } | |
| } | |
| class MyParentComponent extends Component { | |
| … | |
| render() { | |
| <MyChildComponent callback={ (fromChildArg) => { console.log(fromChildArg) } } /> | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment