aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/store/provider.jsx18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/shared/store/provider.jsx b/src/shared/store/provider.jsx
new file mode 100644
index 0000000..743f656
--- /dev/null
+++ b/src/shared/store/provider.jsx
@@ -0,0 +1,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;