summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/connect.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-09-05 11:04:36 +0200
committerSamy Pessé <samypesse@gmail.com>2016-09-05 11:04:36 +0200
commitb170b4d197822f3949b63df69e063d07cbb8e5c9 (patch)
tree556d9919e09eb12bea462a3d3a7801a1cea0611e /packages/gitbook-core/src/connect.js
parenta14ca3e268e95a7eab59fb205b41da7331d57631 (diff)
downloadgitbook-b170b4d197822f3949b63df69e063d07cbb8e5c9.zip
gitbook-b170b4d197822f3949b63df69e063d07cbb8e5c9.tar.gz
gitbook-b170b4d197822f3949b63df69e063d07cbb8e5c9.tar.bz2
Start basis of gitbook-core
Diffstat (limited to 'packages/gitbook-core/src/connect.js')
-rw-r--r--packages/gitbook-core/src/connect.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/gitbook-core/src/connect.js b/packages/gitbook-core/src/connect.js
new file mode 100644
index 0000000..2bd9cb9
--- /dev/null
+++ b/packages/gitbook-core/src/connect.js
@@ -0,0 +1,13 @@
+const ReactRedux = require('react-redux');
+
+/**
+ * Connect a component to the GitBook store
+ * @param {ReactComponent} Component
+ * @param {Function} mapStateToProps
+ * @return {ReactComponent}
+ */
+function connect(Component, mapStateToProps) {
+ return ReactRedux.connect(Component, mapStateToProps);
+}
+
+module.exports = connect;