UNPKG

@wordpress/editor

Version:
43 lines (40 loc) 1.08 kB
/** * WordPress dependencies */ import { createReduxStore, register } from '@wordpress/data'; /** * Internal dependencies */ import reducer from './reducer'; import * as selectors from './selectors'; import * as actions from './actions'; import * as privateActions from './private-actions'; import * as privateSelectors from './private-selectors'; import { STORE_NAME } from './constants'; import { unlock } from '../lock-unlock'; /** * Post editor data store configuration. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore * * @type {Object} */ export const storeConfig = { reducer, selectors, actions }; /** * Store definition for the editor namespace. * * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore * * @type {Object} */ export const store = createReduxStore(STORE_NAME, { ...storeConfig }); register(store); unlock(store).registerPrivateActions(privateActions); unlock(store).registerPrivateSelectors(privateSelectors); //# sourceMappingURL=index.js.map