-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patterns: Move category map creation out of useSelect #54584
Conversation
packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @aaronrobertshaw!
Size Change: +5 B (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
Flaky tests detected in 96dbc0e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6231874858
|
Related:
What?
Moves the category map creation outside of the
useSelect
that retrieves the categories.Why?
Avoids a new value being returned on each call of
mapSelect
.How?
Move the same logic outside the
useSelect
and into auseMemo
Testing Instructions
Screenshots or screencast