Set constructor properly in createReactNativeComponentClass
Summary: Without this, the displayName property wasn't found when looking at `.constructor` on a component instance. Fixes facebook/react-devtools#92. Closes https://github.com/facebook/react-native/pull/1471 Github Author: Ben Alpert <balpert@fb.com> Test Plan: Used devtools on MoviesApp and saw RCTView instead of Unknown: {F22491590}
This commit is contained in:
Родитель
09cef03cd3
Коммит
c37509727f
|
@ -36,6 +36,7 @@ var createReactNativeComponentClass = function(
|
|||
};
|
||||
Constructor.displayName = viewConfig.uiViewClassName;
|
||||
Constructor.prototype = new ReactNativeBaseComponent(viewConfig);
|
||||
Constructor.prototype.constructor = Constructor;
|
||||
|
||||
return Constructor;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче