Skip to content
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

Code Data: Fix ESLint warning for the 'useEntityRecord' hook #51562

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

Mamaduka
Copy link
Member

What?

PR fixes ESLint warning for the 'useEntityRecord' hook - React Hook useMemo has missing dependencies.

Why?

The hook will return stale data mutation helpers if kind or name values change during re-render. All these dependencies have stable references and won't cause any side effects.

Testing Instructions

CI checks should pass as before.

@Mamaduka Mamaduka requested a review from nerrad as a code owner June 16, 2023 07:44
@Mamaduka Mamaduka self-assigned this Jun 16, 2023
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Core data /packages/core-data labels Jun 16, 2023
@github-actions
Copy link

github-actions bot commented Jun 16, 2023

Flaky tests detected in 8199529.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5287505053
📝 Reported issues:

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I didn't know there were such useful utilities as edit() and save() 😄

@Mamaduka Mamaduka merged commit a3f9fbd into trunk Jun 16, 2023
50 checks passed
@Mamaduka Mamaduka deleted the fix/use-entity-record-eslint-warning branch June 16, 2023 10:23
@github-actions github-actions bot added this to the Gutenberg 16.1 milestone Jun 16, 2023
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Core data /packages/core-data [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants