From 68ebe352bb6be82a8f1fce89b830efd30a637cf1 Mon Sep 17 00:00:00 2001 From: Copons Date: Thu, 18 Mar 2021 12:09:09 +0000 Subject: [PATCH] Add AsyncModeProvider to speed up the persistent list view --- .../secondary-sidebar/list-view-sidebar.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/edit-site/src/components/secondary-sidebar/list-view-sidebar.js b/packages/edit-site/src/components/secondary-sidebar/list-view-sidebar.js index efc93f8a957869..bbb5fe34006274 100644 --- a/packages/edit-site/src/components/secondary-sidebar/list-view-sidebar.js +++ b/packages/edit-site/src/components/secondary-sidebar/list-view-sidebar.js @@ -12,7 +12,7 @@ import { useInstanceId, useMergeRefs, } from '@wordpress/compose'; -import { useDispatch, useSelect } from '@wordpress/data'; +import { AsyncModeProvider, useDispatch, useSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; import { closeSmall } from '@wordpress/icons'; import { ESCAPE } from '@wordpress/keycodes'; @@ -71,13 +71,15 @@ export default function ListViewSidebar() { className="edit-site-editor__list-view-panel-content" ref={ useMergeRefs( [ focusReturnRef, focusOnMountRef ] ) } > - + + + );