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:
Ben Alpert 2015-05-31 12:44:18 -07:00
Родитель 09cef03cd3
Коммит c37509727f
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -36,6 +36,7 @@ var createReactNativeComponentClass = function(
};
Constructor.displayName = viewConfig.uiViewClassName;
Constructor.prototype = new ReactNativeBaseComponent(viewConfig);
Constructor.prototype.constructor = Constructor;
return Constructor;
};