Skip to content

Conversation

@SainathPoojary
Copy link
Contributor

@SainathPoojary SainathPoojary commented Jun 10, 2025

What?

Related issue: #42125
Related PR: #1062

This PR adds a missing JSDoc @example comment to the getCurrentPostId selector,

Why?

To improve developer documentation and maintain consistency with other selectors that include usage examples. The @example demonstrates how to properly use the getCurrentPostId selector with the useSelect hook

@github-actions
Copy link

github-actions bot commented Jun 10, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SainathPoojary <sainathpoojary@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@SainathPoojary SainathPoojary changed the title Docs/add example doc Editor: Add example usage for getCurrentPostId selector Jun 10, 2025
@Mamaduka
Copy link
Member

@SainathPoojary, the related issue/PR points to the same link.

P.S. I think @ryanwelcher was also working on something similar. I think, once someone knows how the useSelect hook works, those examples won't be beneficial.

@SainathPoojary
Copy link
Contributor Author

Thanks for pointing it out, @Mamaduka . I’ve updated the PR description, the correct related issue is #42125.

@t-hamano t-hamano added [Type] Developer Documentation Documentation for developers [Package] Editor /packages/editor labels Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Editor /packages/editor [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants