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

Fix missing closing tag for RegistryConsumer example #16153

Merged
merged 3 commits into from
Jun 25, 2019

Conversation

ocean90
Copy link
Member

@ocean90 ocean90 commented Jun 13, 2019

@ocean90 ocean90 added [Type] Developer Documentation Documentation for developers [Package] Data /packages/data labels Jun 13, 2019
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it seems that this documentation is generated and should be instead fixed in the source (JSDoc of the function itself)

@aduth
Copy link
Member

aduth commented Jun 25, 2019

Actually, it seems that this documentation is generated and should be instead fixed in the source (JSDoc of the function itself)

Specifically, here:

* ```js
* const {
* RegistryProvider,
* RegistryConsumer,
* createRegistry
* } = wp.data;
*
* const registry = createRegistry( {} );
*
* const App = ( { props } ) => {
* return <RegistryProvider value={ registry }>
* <div>Hello There</div>
* <RegistryConsumer>
* { ( registry ) => (
* <ComponentUsingRegistry
* { ...props }
* registry={ registry }
* ) }
* </RegistryConsumer>
* </RegistryProvider>
* }

Changing the file and running npm run docs:build should have the intended effect.

@ocean90 ocean90 force-pushed the fix/data-docs-missing-code-tag branch from 2adbb36 to 1cbeb07 Compare June 25, 2019 17:16
@ocean90 ocean90 requested a review from youknowriad June 25, 2019 18:13
@youknowriad
Copy link
Contributor

I actually just tried running npm run docs:build locally, and it seems that change is reverted. I wonder if there's an error in the docs tool.

@youknowriad
Copy link
Contributor

Nevermind, I had an outdated branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Data /packages/data [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants