Properly diff props on change

This commit is contained in:
Brent Vatne 2015-04-05 19:34:20 -07:00
parent 78e1a330c2
commit 161cf11a63
2 changed files with 10 additions and 2 deletions

View File

@ -34,11 +34,19 @@ var LinearGradient = React.createClass({
},
});
var strictEquality = (a, b) => { return a !== b; };
var BVLinearGradient = createReactIOSNativeComponentClass({
validAttributes: merge(ReactIOSViewAttributes.UIView, {colors: true, start: true, end: true, locations: true}),
validAttributes: merge(ReactIOSViewAttributes.UIView, {
colors: {diff: strictEquality},
start: {diff: strictEquality},
end: {diff: strictEquality},
locations: {diff: strictEquality},
}),
uiViewClassName: 'BVLinearGradient',
});
var styles = StyleSheet.create({
base: { },
});

View File

@ -1,6 +1,6 @@
{
"name": "react-native-linear-gradient",
"version": "0.1.3",
"version": "0.1.4",
"description": "A <LinearGradient> element for react-native",
"main": "LinearGradient.ios.js",
"author": {