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

Element: Create dummy context components for type switch #8998

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Aug 14, 2018

Related: #8967

This pull request seeks to refactor the serialize behavior of @wordpress/element to reference $$typeof property of dummy Provider and Consumer components when serializing context.

Testing instructions:

Verify there are no regressions in the issue described in #8967.

Ensure unit tests pass:

npm run test-unit

@aduth aduth added [Type] Code Quality Issues or PRs that relate to code quality [Package] Element /packages/element labels Aug 14, 2018
@aduth aduth added the Browser Issues Issues or PRs that are related to browser specific problems label Aug 14, 2018
@gziolo
Copy link
Member

gziolo commented Aug 14, 2018

I had a similar idea but wasn’t aware which internal property could be used 👌

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.

LGTM 👍 Confirmed it's working properly. Nice "hack"

@aduth aduth merged commit 859a8d2 into master Aug 15, 2018
@mtias mtias deleted the refactor/element-serialize-context-types branch August 16, 2018 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Package] Element /packages/element [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants