Skip to content

Instantly share code, notes, and snippets.

@hishnash
Created April 5, 2017 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hishnash/cf7a05f29ea71d6b8159b6e2777ddf8a to your computer and use it in GitHub Desktop.
Save hishnash/cf7a05f29ea71d6b8159b6e2777ddf8a to your computer and use it in GitHub Desktop.
// 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