Files
gitbook/packages/gitbook-core/src/createPlugin.js
T
2016-09-05 11:04:36 +02:00

17 lines
346 B
JavaScript

/**
* Create a plugin to extend the state and the views.
*
* @param {Function(dispatch, state)} onInitialState
* @param {Funciton(state, action)} onReduceState
* @return {Plugin}
*/
function createPlugin(onInitialState, onReduceState) {
return {
onInitialState,
onReduceState
};
}
module.exports = createPlugin;