React Mixout - Pass Context
For a full description of what this is please refer to the main README file of this project.
This mixout allows you to easily forward props as context.
Installation
You can install this package with the following command:
npm install react-mixout-pass-context
Example
;;; Component static contextTypes = color: ReactPropTypesstring ; { return <span style=color: thiscontextcolor>Hello</span>; } // Although directly using context when props could do doesn't make sense,// but you get the point. :D MyComponent;
API Reference
passContext
: Injector;
name
: The name context to be passed down the tree.builder
: Calculates the context value from the component props.
Typings
The typescript type definitions are also available and are installed via npm.
License
This project is licensed under the MIT license.