From 9aed6fab86d1afa5b27cbb20dfbc6bade81101bb Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Tue, 30 May 2017 13:54:21 +0100 Subject: [PATCH] adds getName() to base component, to be used by RN inspector --- src/renderers/native/ReactNativeBaseComponent.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderers/native/ReactNativeBaseComponent.js b/src/renderers/native/ReactNativeBaseComponent.js index fba2116e86ee..ea4f15a8cdc1 100644 --- a/src/renderers/native/ReactNativeBaseComponent.js +++ b/src/renderers/native/ReactNativeBaseComponent.js @@ -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. *