Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Aug 20, 2018

Fixes https://github.com/facebook/react/pull/13397/files#r211260178. Surfaced via internal testing.
I added a regression test.

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.

Factory components are hard for me to think about for some reason. I think this fix looks okay though! Left a tiny nit about naming, but it's up to you whether you respond to it.

function getUnmaskedContext(
workInProgress: Fiber,
Component: Function,
didPushOwnContext: boolean,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The naming of this implies that the Fiber is a context provider when it's actually meant more to reflect which phase the component is in. Maybe we could call it something more meaningful? Even didPushOwnContextIfProvider?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. I couldn't find a name I'd be happy with. Which reflects how messed up this whole thing is.

@gaearon gaearon merged commit 0beb2ee into facebook:master Aug 20, 2018
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.

3 participants