react-context
Version:
Helpful Properties with React Context
18 lines (15 loc) • 407 B
Markdown
id: usage-root
title: Wrap Root
Require `react-context` into your top-most component and wrap the export with the context function. It sets up the context to pass down data to all of your children components.
```
var React = require('react');
var context = require('react-context');
var Root = React.createClass({
render(){
return <div>Root</div>
}
});
module.exports = context(Root);
```