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:
Eli White
2018-08-24 14:01:57 -07:00
committed by Facebook Github Bot
parent 035597566f
commit d2c27f5bff
7 changed files with 5 additions and 718 deletions

View File

@@ -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;