[ReactNative] Warn when native component does not exist

This commit is contained in:
Alex Kotliarskyi 2015-05-22 16:16:47 -07:00
parent c2854dc397
commit 53ea27c7b8
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ var pointsDiffer = require('pointsDiffer');
var matricesDiffer = require('matricesDiffer');
var sizesDiffer = require('sizesDiffer');
var verifyPropTypes = require('verifyPropTypes');
var warning = require('warning');
/**
* Used to create React components that directly wrap native component
@ -43,6 +44,7 @@ function requireNativeComponent(
): Function {
var viewConfig = RCTUIManager[viewName];
if (!viewConfig || !viewConfig.nativeProps) {
warning(false, 'Native component for "%s" does not exist', viewName);
return UnimplementedView;
}
var nativeProps = {