@samitouri / QOS-React / commits / 319ba0bba9

adds getName() to base component, to be used by RN inspector (#9811)

Dominic Gannaway committed May 30, 2017 at 15:27 UTC 319ba0bba92649c9204f66388f78112fa99dce19
1 file changed +4
src/renderers/native/ReactNativeBaseComponent.js
+4
@@ -119,6 +119,10 @@ ReactNativeBaseComponent.Mixin = {
119 this.updateChildren(nextElement.props.children, transaction, context);
120 },
121
122 + getName() {
123 + return this.constructor.displayName || this.constructor.name || 'Unknown';
124 + },
125 +
126 /**
127 * Currently this still uses IDs for reconciliation so this can return null.
128 *