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

Updated getEntityRecord doc by using selector instead of dispatch #51298

Conversation

paulopmt1
Copy link
Contributor

What?

Update docs by using the selector instead dispatch while getting POST information from the store

Why?

Ensuring the docs reflect our selector's behavior

Testing Instructions

Ensure the following docs https://developer.wordpress.org/block-editor/explanations/architecture/entities/ uses wp.data.select( 'core' ).getEntityRecord( 'postType', 'post', 1 ); instead of wp.data.dispatch( 'core' ).getEntityRecord( 'postType', 'post', 1 );

Testing Instructions for Keyboard

@youknowriad
Copy link
Contributor

Thanks for the fix.

@skorasaurus skorasaurus added the [Type] Developer Documentation Documentation for developers label Jun 7, 2023
@t-hamano t-hamano self-requested a review June 11, 2023 08:37
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 have run the updated code in the browser console and confirmed that it works correctly.

@t-hamano t-hamano merged commit 5a1d376 into WordPress:trunk Jun 11, 2023
@github-actions github-actions bot added this to the Gutenberg 16.1 milestone Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants