summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/connect.js
blob: e30eb2213410ba9f5dfebe4308490acd55141627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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(mapStateToProps)(Component);
}

module.exports = connect;