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

Add test for displayName on React.memo components #18925

Merged
merged 2 commits into from
May 15, 2020

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented May 14, 2020

Summary

Adds a test for display name behavior of

const MemoComponent = React.memo(() => {});
MemoComponent.displayName = "SomeName";

The behavior was implemented in https://github.com/facebook/react/pull/18495/files#diff-ad60306adf3e53077dba1bbeabd57b19R30-R451 but untested. Commenting out the linked lines does not break any test on master.

1 Might need to scroll a bit when opening a link since the highlighted lines are collapsed initially.

Test Plan

n/a

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 14, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7265700:

Sandbox Source
stupefied-thunder-j0myg Configuration

@sizebot
Copy link

sizebot commented May 14, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 7265700

@sizebot
Copy link

sizebot commented May 14, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 7265700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants