:shipit: Helpful Properties with React Context
…npm install react-context --saveWrap your top-most component with react-context.
var React = require('react');
var context = require('react-context');
var Root = React.createClass({
render() {
return
}
});
module.exports = context(Root);Pass it an array of types you want to subscribe to, or call it with no arguments to subscribe to all of them.
// Subscribe to scroll and adBlock
Child.contextTypes = context.subscribe(['scroll', 'adBlock']);
// Subscribe to every context
Child.contextTypes = context.subscribe();No open issues yet, or sync has not completed.