diff options
Diffstat (limited to 'packages/gitbook-core/src/lib/createContext.js')
-rw-r--r-- | packages/gitbook-core/src/lib/createContext.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/gitbook-core/src/lib/createContext.js b/packages/gitbook-core/src/lib/createContext.js index ec240be..2a826d1 100644 --- a/packages/gitbook-core/src/lib/createContext.js +++ b/packages/gitbook-core/src/lib/createContext.js @@ -13,7 +13,18 @@ const Navigation = require('../actions/navigation'); const isBrowser = (typeof window !== 'undefined'); +/** + * The core plugin defines the defualt behaviour of GitBook and provides + * actions to other plugins. + * @type {Plugin} + */ const corePlugin = new Plugin({ + activate: (dispatch) => { + dispatch(Navigation.activate()); + }, + deactivate: (dispatch) => { + dispatch(Navigation.deactivate()); + }, reduce: coreReducers, actions: { Components, I18n, Navigation |