Created
June 29, 2016 19:06
-
-
Save brookslyrette/a85fc3ecc524fe3dcb34c001aca4484f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function wrapWithContext(context, contextTypes, children) { | |
| const wrapperWithContext = React.createClass({ | |
| childContextTypes: contextTypes, | |
| getChildContext() { | |
| return context; | |
| }, | |
| render() { | |
| return children; | |
| }, | |
| }); | |
| return React.createElement(wrapperWithContext); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment