Skip to content

Updated getEntityRecord doc by using selector instead of dispatch#51298

Merged
t-hamano merged 1 commit intoWordPress:trunkfrom
paulopmt1:update/using-selector-on-getEntityRecord-doc
Jun 11, 2023
Merged

Updated getEntityRecord doc by using selector instead of dispatch#51298
t-hamano merged 1 commit intoWordPress:trunkfrom
paulopmt1:update/using-selector-on-getEntityRecord-doc

Conversation

@paulopmt1
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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