Created
April 5, 2017 08:22
-
-
Save hishnash/cf7a05f29ea71d6b8159b6e2777ddf8a to your computer and use it in GitHub Desktop.
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
// Example of a simple Node Component | |
export default class BulletList extends Node { | |
static childContextTypes = { | |
isInList: React.PropTypes.bool | |
}; | |
getChildContext() { | |
return { isInList: true } | |
} | |
render() { | |
// Render what we need and render in the children. | |
return <ul>{this.renderChildren()}</ul> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment