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

Update serverSideRender docs to include how to use from the wp global #18722

Merged

Conversation

ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented Nov 25, 2019

Description

If accessing ServerSideRender from the wp global, due the the name change ( serverSideRender vs ServerSideRender ) an alias is required to work in JSX. This PR adds an example for that.

How has this been tested?

Documentation only.

@ryanwelcher ryanwelcher added [Package] Server Side Render /packages/server-side-render [Type] Developer Documentation Documentation for developers labels Nov 25, 2019
@ryanwelcher ryanwelcher self-assigned this Nov 25, 2019
@ryanwelcher ryanwelcher requested a review from mmtr November 25, 2019 16:21
@gziolo
Copy link
Member

gziolo commented Nov 26, 2019

@jorgefilipecosta - did something went wrong here? I don't think it was planned to work this way.

@ryanwelcher ryanwelcher force-pushed the fix/server-side-render-docs branch from e53300f to a9f7fca Compare November 26, 2019 14:31
@ryanwelcher
Copy link
Contributor Author

@gziolo @jorgefilipecosta I think this was due to the package being passed to camelCaseDash here - https://github.com/WordPress/gutenberg/blob/e4b5330/webpack.config.js#L37

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Discussed during today's JavaScript chat (link requires registration):

https://wordpress.slack.com/archives/C5UNMSU4R/p1585059454306400

As discussed there, ideally we want some "fix" to these namings, but in the meantime, the current documentation is lacking and makes it difficult to use this component when referencing the global. I think we should merge this as accurate to the current state of affairs. Separately, we can consider how address the issue of naming.

@ryanwelcher ryanwelcher merged commit 2ebf486 into WordPress:master Mar 24, 2020
@github-actions github-actions bot added this to the Gutenberg 7.9 milestone Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Server Side Render /packages/server-side-render [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants