Created
April 1, 2016 19:04
-
-
Save grebaldi/9e6ca7d89c19d852a66e39460c8ec372 to your computer and use it in GitHub Desktop.
rendering context
This file contains 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
setRenderers({ | |
'MyAwesome.Package:GridItem': GridItem, | |
'MyAweSome.Package:GridItem MyAwesome.Package:Image': Image | |
}); | |
@context() | |
class GridItem extends Component { | |
static propTypes = { | |
renderingContext: PropType.instanceOf(RenderingContext) | |
}; | |
componentDidMount() { | |
this.props.renderingContext.push('Me'); | |
} | |
render() { | |
return ( | |
<Image renderingContext={this.props.renderingContext} ></Image> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment