Add entity-provider functions in the core-data documentation#51142
Add entity-provider functions in the core-data documentation#51142aurooba wants to merge 3 commits intoWordPress:trunkfrom
entity-provider functions in the core-data documentation#51142Conversation
|
+1 to getting this reviewed and merged! |
|
Is this maybe done by #63528? It seems similar, but I’m not sure. |
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Correct! This PR from a year ago has been made redundant by that more recent PR. I'll close it out. |
What?
This PR updates the documentation for the
core-datapackage to include the hooks and providers in thecore-data/src/entity-provider.jsfile.Why?
Folks outside of just core can use functions like
useEntityPropand they should be documented and available in the handbookHow?
So I had to make a small code change in order for this to work well. the
EntityProviderfunction was being exported as a default function. As far as I could tell, there's no way for me to provide an alternative name sodocgenwould name this functiondefaultin the markdown file, which is no good.So I switched it so that it's no longer a default export and just a normal named export from the file. From what I can tell, this doesn't cause any issues anywhere, but I'd love for someone to confirm this!