@wordpress/block-editor
Version:
32 lines (31 loc) • 978 B
JavaScript
// packages/block-editor/src/store/index.js
import { createReduxStore, registerStore } from "@wordpress/data";
import reducer from "./reducer";
import * as selectors from "./selectors";
import * as privateActions from "./private-actions";
import * as privateSelectors from "./private-selectors";
import * as actions from "./actions";
import { STORE_NAME } from "./constants";
import { unlock } from "../lock-unlock";
var storeConfig = {
reducer,
selectors,
actions
};
var store = createReduxStore(STORE_NAME, {
...storeConfig,
persist: ["preferences"]
});
var registeredStore = registerStore(STORE_NAME, {
...storeConfig,
persist: ["preferences"]
});
unlock(registeredStore).registerPrivateActions(privateActions);
unlock(registeredStore).registerPrivateSelectors(privateSelectors);
unlock(store).registerPrivateActions(privateActions);
unlock(store).registerPrivateSelectors(privateSelectors);
export {
store,
storeConfig
};
//# sourceMappingURL=index.js.map