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

Mark context consumers with PerformedWork effect on render #12729

Merged
merged 2 commits into from
May 2, 2018

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented May 1, 2018

It's used by DevTools for "Highlight Updates" feature.
We already mark both classes and functions with it.

It was only used for classes by DevTools, which treated context consumers as always changing. But that turned out to be subtly wrong in some cases (see #12715).

Since this has some overhead and ForwardRef is likely going to be used around context, let's skip it.
We don't highlight ForwardRef alone in DevTools anyway.
@gaearon gaearon changed the title Mark new component types with PerformedWork effect Mark context consumers with PerformedWork effect on render May 1, 2018
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

This looks okay to me.

PS Why'd you back out the forwardRef change?

@gaearon
Copy link
Collaborator Author

gaearon commented May 2, 2018

It's adding overhead but I'm not highlighting their updates in DevTools anyway.

@gaearon gaearon merged commit 25dda90 into facebook:master May 2, 2018
@gaearon gaearon deleted the dt-more-fix branch May 2, 2018 15:35
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.

None yet

3 participants