Change to new style of requireNativeComponent

This commit is contained in:
Brent Vatne 2015-05-23 15:09:59 -07:00
parent e62edb41a2
commit d7ae5eac60
2 changed files with 3 additions and 15 deletions

View File

@ -5,19 +5,7 @@
'use strict';
var ReactNativeViewAttributes = require('ReactNativeViewAttributes');
var createReactNativeComponentClass = require('createReactNativeComponentClass');
var merge = require('merge');
var deepDiffer = require('deepDiffer');
var LinearGradient = createReactNativeComponentClass({
validAttributes: merge(ReactNativeViewAttributes.UIView, {
colors: {diff: deepDiffer},
start: {diff: deepDiffer},
end: {diff: deepDiffer},
locations: {diff: deepDiffer},
}),
uiViewClassName: 'BVLinearGradient',
});
var { requireNativeComponent, } = require('react-native');
var LinearGradient = requireNativeComponent('BVLinearGradient', null);
module.exports = LinearGradient;

View File

@ -13,7 +13,7 @@
"url": "git@github.com:brentvatne/react-native-linear-gradient.git"
},
"peerDependencies": {
"react-native": "^0.4.3"
"react-native": "^0.4.4"
},
"devDependencies": {
"jest-cli": "0.2.1"