mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 11:03:39 +00:00
17 lines
346 B
JavaScript
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;
|