Skip to content

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Oct 29, 2016

This introduces a small indirection so that isomorphic and shared DOM modules don't depend on getName() method being present on the owner (which can now be a fiber).


'use strict';

function getComponentName(internalInstance) : string | null {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this DEV only so that we are guaranteed to only use it in DEV?

@sebmarkbage
Copy link
Collaborator

Looks like you have a Flow issue but otherwise lgtm.

@gaearon
Copy link
Collaborator Author

gaearon commented Oct 29, 2016

Is this okay? If I wrap whole module in __DEV__ it no longer flowchecks because Flow doesn't know we only import it in __DEV__, and can't find the callable export.

@gaearon gaearon added this to the 15-next milestone Oct 29, 2016
@gaearon gaearon merged commit c17bf38 into facebook:master Oct 29, 2016
@gaearon gaearon deleted the getcomponentname branch October 29, 2016 23:43
acusti pushed a commit to brandcast/react that referenced this pull request Mar 15, 2017
* Get a few more Fiber tests passing

* Fix Flow and wrap in __DEV__
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