Leverage deepDiffer instead

This commit is contained in:
Brent Vatne 2015-04-06 11:14:40 -07:00
parent 161cf11a63
commit 511cefc705
1 changed files with 5 additions and 6 deletions

View File

@ -7,6 +7,7 @@ var PropTypes = require('ReactPropTypes');
var NativeMethodsMixin = require('NativeMethodsMixin'); var NativeMethodsMixin = require('NativeMethodsMixin');
var flattenStyle = require('flattenStyle'); var flattenStyle = require('flattenStyle');
var merge = require('merge'); var merge = require('merge');
var deepDiffer = require('deepDiffer');
var LinearGradient = React.createClass({ var LinearGradient = React.createClass({
propTypes: { propTypes: {
@ -34,14 +35,12 @@ var LinearGradient = React.createClass({
}, },
}); });
var strictEquality = (a, b) => { return a !== b; };
var BVLinearGradient = createReactIOSNativeComponentClass({ var BVLinearGradient = createReactIOSNativeComponentClass({
validAttributes: merge(ReactIOSViewAttributes.UIView, { validAttributes: merge(ReactIOSViewAttributes.UIView, {
colors: {diff: strictEquality}, colors: {diff: deepDiffer},
start: {diff: strictEquality}, start: {diff: deepDiffer},
end: {diff: strictEquality}, end: {diff: deepDiffer},
locations: {diff: strictEquality}, locations: {diff: deepDiffer},
}), }),
uiViewClassName: 'BVLinearGradient', uiViewClassName: 'BVLinearGradient',
}); });