mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-01-20 20:49:39 +00:00
Properly diff props on change
This commit is contained in:
parent
78e1a330c2
commit
161cf11a63
@ -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: { },
|
||||
});
|
||||
|
@ -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": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user