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

[Fiber] Include owner in invalid element type invariant #8637

Merged
merged 1 commit into from Dec 27, 2016

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Dec 24, 2016

This adds owner to invalid type invariant for Fiber. It's already there in Stack.
Ideally we'd add component stack later here too, but I want parity for now.

I changed ReactDebugCurrentFiber.getCurrentFiberOwnerName() because it used to only work for host components since I first added it when working on DOM invariants/warnings. The problem is it didn't report the owner name when the owner is the current fiber itself. This is now fixed with an explicit switch on fiber tag.

@iamdustan Since you're looking at Fiber and warnings would you like to review this?

return getComponentName(fiber._debugOwner);
}
return null;
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

will the other tag types ever have a component name to return?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe coroutines but we haven't implemented them fully yet. I'm aiming for parity for now.

@iamdustan
Copy link
Contributor

This looks good to me.

I think I should add the Check the render method ofBrokenRender` to the #8635, too.

@gaearon gaearon merged commit 6b73073 into facebook:master Dec 27, 2016
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