mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 02:53:29 +00:00
14 lines
333 B
JavaScript
14 lines
333 B
JavaScript
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;
|