Editor: Update withDispatch-wrapped components to use registry if applicable #12890
Closed
4 tasks done
Labels
[Package] Data
/packages/data
[Type] Code Quality
Issues or PRs that relate to code quality
[Type] Performance
Related to performance efforts
[Type] Task
Issues or PRs that have been broken down into an individual action to take
Milestone
Previously: #11851
With the changes introduced by #11851, we should seek to refactor components which provide data through
withSelect
for the sole purpose of satisfying a dispatch callback. These components instead should use the new registry argument.Upon investigation, these are the components I discovered to be refactored:
EditorGlobalKeyboardShortcuts
(theisDirty
prop) (Use select in withDispatch to avoid using unused props #13288)InserterMenu
(theselectedBlock
prop) (Use select in withDispatch to avoid using unused props #13288)EditorModeKeyboardShortcuts
(thehasBlockSelection
prop) (Use select in withDispatch to avoid using unused props #13288)BlockConvertButton
(theblock
prop) (Performance: optimize the usage of getBlockIndex #13067)block
is used inwithSelect
, but it should be refactored to use the trivialgetBlockName
selector instead (getBlock
is deemed expensive)The workflow for discovering these was to search the codebase for and sort through results of
withDispatch
with a mapping which makes use of the secondownProps
argument.The text was updated successfully, but these errors were encountered: