Skip to content

Commit

Permalink
adds getName() to base component, to be used by RN inspector (faceboo…
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm authored May 30, 2017
1 parent 07d229b commit 319ba0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/renderers/native/ReactNativeBaseComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ ReactNativeBaseComponent.Mixin = {
this.updateChildren(nextElement.props.children, transaction, context);
},

getName() {
return this.constructor.displayName || this.constructor.name || 'Unknown';
},

/**
* Currently this still uses IDs for reconciliation so this can return null.
*
Expand Down

0 comments on commit 319ba0b

Please sign in to comment.