diff options
Diffstat (limited to 'packages/gitbook-core/src/createPlugin.js')
-rw-r--r-- | packages/gitbook-core/src/createPlugin.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/gitbook-core/src/createPlugin.js b/packages/gitbook-core/src/createPlugin.js new file mode 100644 index 0000000..1fcf495 --- /dev/null +++ b/packages/gitbook-core/src/createPlugin.js @@ -0,0 +1,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; |