/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/patterns/src/store/index.js
32 строки
847 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { createReduxStore, register } from '@wordpress/data'; import reducer from './reducer'; import * as actions from './actions'; import { STORE_NAME } from './constants'; import * as selectors from './selectors'; 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, }; /** * 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( actions ); unlock( store ).registerPrivateSelectors( selectors );