Add entity-provider
functions in the core-data
documentation
#51142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This PR updates the documentation for the
core-data
package to include the hooks and providers in thecore-data/src/entity-provider.js
file.Why?
Folks outside of just core can use functions like
useEntityProp
and 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
EntityProvider
function was being exported as a default function. As far as I could tell, there's no way for me to provide an alternative name sodocgen
would name this functiondefault
in 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!