Created
October 15, 2016 22:43
-
-
Save codeocelot/83eccd47778c7050057e9813ee8165ed to your computer and use it in GitHub Desktop.
React Router Provider
This file contains 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
export default class Provider extends Component { | |
getChildContext() { | |
return { store: this.store } | |
} | |
constructor(props, context) { | |
super(props, context) | |
this.store = props.store | |
} | |
render() { | |
return Children.only(this.props.children) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment