blob: 743f656ee5a1bc269e752a239b5c857ab2974e36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import React from 'react';
import PropTypes from 'prop-types';
class Provider extends React.PureComponent {
getChildContext() {
return { store: this.props.store };
}
render() {
return React.Children.only(this.props.children);
}
}
Provider.childContextTypes = {
store: PropTypes.any,
};
export default Provider;
|