You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Editor: Update withDispatch-wrapped components to use registry if applicable #12890
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:
Refactor: block is used in withSelect, but it should be refactored to use the trivial getBlockName 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 second ownProps argument.
Searching 1670 files for "withDispatch( ( dispatch, ownProps )"
Activity
gziolo commentedon Dec 17, 2018
Did you search for
withDispatch( ( dispatch,There are 37 matches which we might want to verify, too:aduth commentedon Dec 17, 2018
I did not! The in-place destructuring could certainly qualify. Let's update the original comment with new items as they're discovered.
aduth commentedon Dec 18, 2018
I updated the original comment with two more from a
withDispatch( ( dispatch, {search.aduth commentedon Feb 14, 2019
Closing based on referenced subtasks having been merged.