Skip to content

Commit c077aa8

Browse files
committed
resolve #753 | use useNativeDriver in RadioButton animations
1 parent dc76174 commit c077aa8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/radioButton/RadioButton.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,28 @@ class RadioButton extends BaseComponent {
101101
Animated.parallel([
102102
Animated.timing(opacityAnimationValue, {
103103
toValue: 1,
104-
duration: animationTime
104+
duration: animationTime,
105+
useNativeDriver: true
105106
}),
106107
Animated.timing(scaleAnimationValue, {
107108
toValue: 1,
108109
delay: animationDelay,
109110
duration: animationTime,
110-
easing: Easing.bezier(0.165, 0.84, 0.44, 1)
111+
easing: Easing.bezier(0.165, 0.84, 0.44, 1),
112+
useNativeDriver: true
111113
})
112114
]).start();
113115
} else {
114116
Animated.parallel([
115117
Animated.timing(scaleAnimationValue, {
116118
toValue: 0.8,
117-
duration: animationTime
119+
duration: animationTime,
120+
useNativeDriver: true
118121
}),
119122
Animated.timing(opacityAnimationValue, {
120123
toValue: 0,
121-
duration: animationTime
124+
duration: animationTime,
125+
useNativeDriver: true
122126
})
123127
]).start();
124128
}

0 commit comments

Comments
 (0)