mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
Remove view configs from JS
Summary: Apparently different apps have different implementations of view managers that support different props. This is a problem that we will need to address. Unfortunately, this means we can't have a static config defined in JS. We will need to find another approach to this problem. Reviewed By: sahrens Differential Revision: D9500178 fbshipit-source-id: b591559164fcf29f5fd43e13a0f2da15011491c6
This commit is contained in:
committed by
Facebook Github Bot
parent
035597566f
commit
d2c27f5bff
@@ -10,25 +10,8 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const AndroidConfig = require('ImageViewNativeComponentAndroidConfig');
|
||||
const Platform = require('Platform');
|
||||
|
||||
const verifyComponentAttributeEquivalence = require('verifyComponentAttributeEquivalence');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
|
||||
|
||||
let ImageViewNativeComponent;
|
||||
if (Platform.OS === 'android') {
|
||||
if (__DEV__) {
|
||||
verifyComponentAttributeEquivalence('RCTImageView', AndroidConfig);
|
||||
}
|
||||
|
||||
ImageViewNativeComponent = ReactNativeViewConfigRegistry.register(
|
||||
'RCTImageView',
|
||||
() => AndroidConfig,
|
||||
);
|
||||
} else {
|
||||
ImageViewNativeComponent = requireNativeComponent('RCTImageView');
|
||||
}
|
||||
const ImageViewNativeComponent = requireNativeComponent('RCTImageView');
|
||||
|
||||
module.exports = ImageViewNativeComponent;
|
||||
|
||||
Reference in New Issue
Block a user