summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/createPlugin.js
blob: 1fcf49526fe0953a2fd1d384c28f4a7df60db861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

/**
 * 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;