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 failing test for #17213 #17336

Conversation

samcooke98
Copy link

@samcooke98 samcooke98 commented Nov 10, 2019

I've tried to add a failing test for the issue described here.
#17314

If you run it locally, and change isMemo to be false, the test will pass. The test will also pass if you change the line to
const MemodSubbed = isMemo ? React.memo(Subbed, () => true) : Subbed;


Below are my half-hearted attempts to look into this bug.

It looks like when the compare function is defined it makes React call createFiberFromTypeAndProps. However, if the compare function is not defined, it means React goes down the codepath below;

https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberBeginWork.js#L380-L403

In other words, the bug is likely caused somewhere in updateSimpleMemoComponent

@codesandbox-ci
Copy link

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 5fb7b0c:

Sandbox Source
dreamy-zhukovsky-z0ho9 Configuration

@sizebot
Copy link

sizebot commented Nov 10, 2019

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 5fb7b0c

@sizebot
Copy link

sizebot commented Nov 10, 2019

Warnings
⚠️ Failed to fetch build artifacts for base commit: b8f8258

Size changes (stable)

Generated by 🚫 dangerJS against 5fb7b0c

@stale
Copy link

stale bot commented Feb 12, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Feb 12, 2020
@stale
Copy link

stale bot commented Feb 20, 2020

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

@stale stale bot closed this Feb 20, 2020
@gaearon
Copy link
Collaborator

gaearon commented Feb 21, 2020

Thank you for the test! Took us a while to get to this. Sorry this got autoclosed.
We think #18091 should fix it.

@samcooke98
Copy link
Author

Thanks @gaearon ! Andrew told me as well: #17314 (comment) :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Resolution: Stale Automatically closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants