Leverage deepDiffer instead
This commit is contained in:
parent
161cf11a63
commit
511cefc705
|
@ -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',
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue