From 2ebfab23067dbe72caab854508d3e7cf3bc5ccca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Thu, 26 Jan 2023 11:29:08 +0100 Subject: [PATCH] register() the block-editor store instead of using registerStore() --- packages/block-editor/src/store/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/block-editor/src/store/index.js b/packages/block-editor/src/store/index.js index a4fc9f5b99a06..baa14b94ca9ad 100644 --- a/packages/block-editor/src/store/index.js +++ b/packages/block-editor/src/store/index.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { createReduxStore, registerStore } from '@wordpress/data'; +import { createReduxStore, register } from '@wordpress/data'; /** * Internal dependencies @@ -32,8 +32,4 @@ export const store = createReduxStore( STORE_NAME, { persist: [ 'preferences' ], } ); -// Ideally we'd use register instead of register stores. -registerStore( STORE_NAME, { - ...storeConfig, - persist: [ 'preferences' ], -} ); +register( store );