Skip to content

Instantly share code, notes, and snippets.

@codeocelot
Created October 15, 2016 22:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeocelot/83eccd47778c7050057e9813ee8165ed to your computer and use it in GitHub Desktop.
Save codeocelot/83eccd47778c7050057e9813ee8165ed to your computer and use it in GitHub Desktop.
React Router Provider
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