Skip to content

Commit

Permalink
register() the block-editor store instead of using registerStore() (#…
Browse files Browse the repository at this point in the history
…47447)

`registerStore()` is deprecated – this commit replaces the last usage in the Gutenberg codebase with the new `register()` function call.
  • Loading branch information
adamziel authored Jan 26, 2023
1 parent 3dbd681 commit 619d6d5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/block-editor/src/store/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { createReduxStore, registerStore } from '@wordpress/data';
import { createReduxStore, register } from '@wordpress/data';

/**
* Internal dependencies
Expand Down Expand Up @@ -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 );

0 comments on commit 619d6d5

Please sign in to comment.