Skip to content

Element: Create dummy context components for type switch - #8998

Merged
aduth merged 1 commit into
masterfrom
refactor/element-serialize-context-types
Aug 15, 2018
Merged

aduth merged 1 commit into
masterfrom
refactor/element-serialize-context-types

Conversation

@aduth

@aduth aduth commented Aug 14, 2018

Copy link
Copy Markdown
Member

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 requested review from gziolo and youknowriad August 14, 2018 20:55
@aduth aduth added the Browser Issues Issues or PRs that are related to browser specific problems label Aug 14, 2018
@gziolo

gziolo commented Aug 14, 2018

Copy link
Copy Markdown
Member

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

@youknowriad youknowriad left a comment

Copy link
Copy Markdown
Contributor

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