[ReactNative] rename nativeProps const to NativeProps
This commit is contained in:
parent
0689c0790e
commit
a4442e4576
|
@ -43,13 +43,13 @@ function requireNativeComponent(
|
|||
wrapperComponent: ?Function
|
||||
): Function {
|
||||
var viewConfig = RCTUIManager[viewName];
|
||||
if (!viewConfig || !viewConfig.nativeProps) {
|
||||
if (!viewConfig || !viewConfig.NativeProps) {
|
||||
warning(false, 'Native component for "%s" does not exist', viewName);
|
||||
return UnimplementedView;
|
||||
}
|
||||
var nativeProps = {
|
||||
...RCTUIManager.RCTView.nativeProps,
|
||||
...viewConfig.nativeProps,
|
||||
...RCTUIManager.RCTView.NativeProps,
|
||||
...viewConfig.NativeProps,
|
||||
};
|
||||
viewConfig.uiViewClassName = viewName;
|
||||
viewConfig.validAttributes = {};
|
||||
|
|
|
@ -29,7 +29,7 @@ function verifyPropTypes(
|
|||
);
|
||||
}
|
||||
|
||||
var nativeProps = viewConfig.nativeProps;
|
||||
var nativeProps = viewConfig.NativeProps;
|
||||
for (var prop in nativeProps) {
|
||||
if (!component.propTypes[prop] &&
|
||||
!View.propTypes[prop] &&
|
||||
|
|
|
@ -1482,7 +1482,7 @@ RCT_EXPORT_METHOD(clearJSResponder)
|
|||
}
|
||||
|
||||
// Add native props
|
||||
constantsNamespace[@"nativeProps"] = _viewConfigs[name];
|
||||
constantsNamespace[@"NativeProps"] = _viewConfigs[name];
|
||||
|
||||
allJSConstants[name] = [constantsNamespace copy];
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue