Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 500c6cb

Browse files
committed
fixed useNativeDriver warning
1 parent d157d6e commit 500c6cb

17 files changed

+73
-12
lines changed

‎lib/loader/BreathingLoader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ export default class BreathingLoader extends React.PureComponent {
4040
Animated.timing(this.state.scale, {
4141
toValue: 1,
4242
duration: this.props.frequency,
43+
useNativeDriver: false,
4344
}),
4445
Animated.timing(this.state.scale, {
4546
toValue: 0.1,
4647
duration: this.props.frequency,
48+
useNativeDriver: false,
4749
}),
4850
]).start(() => {
4951
!this.unmounted && this._animation();

‎lib/loader/BubblesLoader.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,16 @@ export default class BubblesLoader extends React.PureComponent {
5151

5252
_animation = (i) => {
5353
Animated.sequence([
54-
Animated.timing(this.state.opacities[i], { toValue: 0.2, duration: 600 }),
55-
Animated.timing(this.state.opacities[i], { toValue: 1, duration: 600 }),
54+
Animated.timing(this.state.opacities[i], {
55+
toValue: 0.2,
56+
duration: 600,
57+
useNativeDriver: false,
58+
}),
59+
Animated.timing(this.state.opacities[i], {
60+
toValue: 1,
61+
duration: 600,
62+
useNativeDriver: false,
63+
}),
5664
]).start(() => {
5765
!this.unmounted && this._animation(i);
5866
});

‎lib/loader/CirclesLoader.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,16 @@ export default class CirclesLoader extends React.PureComponent {
5151

5252
_animation = (i) => {
5353
Animated.sequence([
54-
Animated.timing(this.state.opacities[i], { toValue: 0.1, duration: 600 }),
55-
Animated.timing(this.state.opacities[i], { toValue: 1, duration: 600 }),
54+
Animated.timing(this.state.opacities[i], {
55+
toValue: 0.1,
56+
duration: 600,
57+
useNativeDriver: false,
58+
}),
59+
Animated.timing(this.state.opacities[i], {
60+
toValue: 1,
61+
duration: 600,
62+
useNativeDriver: false,
63+
}),
5664
]).start(() => {
5765
!this.unmounted && this._animation(i);
5866
});

‎lib/loader/CirclesRotationScaleLoader.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default class RotationCircleLoader extends React.PureComponent {
4545
toValue: 360,
4646
duration: 2000,
4747
easing: Easing.linear,
48+
useNativeDriver: false,
4849
}),
4950
]).start(() => {
5051
if (!this.unmounted) {
@@ -56,8 +57,12 @@ export default class RotationCircleLoader extends React.PureComponent {
5657

5758
_animationCircles = (i) => {
5859
Animated.sequence([
59-
Animated.timing(this.state.scales[i], { toValue: 1, duration: 1000 }),
60-
Animated.timing(this.state.scales[i], { toValue: 0.05, duration: 1000 }),
60+
Animated.timing(this.state.scales[i], { toValue: 1, duration: 1000, useNativeDriver: false }),
61+
Animated.timing(this.state.scales[i], {
62+
toValue: 0.05,
63+
duration: 1000,
64+
useNativeDriver: false,
65+
}),
6166
]).start(() => {
6267
!this.unmounted && this._animationCircles(i);
6368
});

‎lib/loader/ColorDotsLoader.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,29 @@ export default class ColorDotsLoader extends Component {
7878
toValue: size * 3 + betweenSpace * 2 + size / 2,
7979
duration: 600,
8080
easing: Easing.linear,
81+
useNativeDriver: false,
8182
}),
8283
Animated.timing(this.state.x, {
8384
toValue: -size / 2,
8485
duration: 0,
86+
useNativeDriver: false,
8587
}),
8688
Animated.timing(this.state.x, {
8789
toValue: size * 3 + betweenSpace * 2 + size / 2,
8890
duration: 600,
8991
easing: Easing.linear,
92+
useNativeDriver: false,
9093
}),
9194
Animated.timing(this.state.x, {
9295
toValue: -size / 2,
9396
duration: 0,
97+
useNativeDriver: false,
9498
}),
9599
Animated.timing(this.state.x, {
96100
toValue: size * 3 + betweenSpace * 2 + size / 2,
97101
duration: 600,
98102
easing: Easing.linear,
103+
useNativeDriver: false,
99104
}),
100105
]).start(() => {
101106
if (!this.unmounted) {

‎lib/loader/DotsLoader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ export default class DotsLoader extends React.PureComponent {
3737
toValue: 1,
3838
duration: 300,
3939
delay: (i + 1) * 200,
40+
useNativeDriver: false,
4041
}),
4142
Animated.timing(self.state.scales[i], {
4243
toValue: 0,
4344
duration: 300,
4445
delay: 50,
46+
useNativeDriver: false,
4547
}),
4648
]);
4749
}

‎lib/loader/DoubleCircleLoader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export default class DoubleCircleLoader extends React.PureComponent {
3939

4040
_animation = (i) => {
4141
Animated.sequence([
42-
Animated.timing(this.state.scales[i], { toValue: 1, duration: 1000 }),
43-
Animated.timing(this.state.scales[i], { toValue: 0, duration: 1000 }),
42+
Animated.timing(this.state.scales[i], { toValue: 1, duration: 1000,useNativeDriver: false }),
43+
Animated.timing(this.state.scales[i], { toValue: 0, duration: 1000,useNativeDriver: false }),
4444
]).start(() => {
4545
!this.unmounted && this._animation(i);
4646
});

‎lib/loader/EatBeanLoader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default class EatBeanLoader extends React.PureComponent {
4646
Animated.timing(this.state.dotsY[i], {
4747
toValue: this.props.size / 2,
4848
duration: 1200,
49+
useNativeDriver: false,
4950
}).start(() => {
5051
if (!this.unmounted) {
5152
this.state.dotsY[i].setValue(this.props.size * 2.2);

‎lib/loader/LineDotsLoader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,19 @@ export default class LineDotsLoader extends React.PureComponent {
6969
toValue: this.centerX[i],
7070
duration: 600,
7171
delay: i * 50,
72+
useNativeDriver: false,
7273
}),
7374
Animated.timing(this.state.x[i], {
7475
toValue: this.centerX[i],
7576
duration: 600,
7677
delay: 300,
78+
useNativeDriver: false,
7779
}),
7880
Animated.timing(this.state.x[i], {
7981
toValue: this.destX[i],
8082
duration: 600,
8183
delay: i * 50,
84+
useNativeDriver: false,
8285
}),
8386
]).start(() => {
8487
if (i === this.props.dotsNumber - 1) {

‎lib/loader/LinesLoader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ export default class LinesLoader extends React.PureComponent {
4949
toValue: self.props.barHeight,
5050
duration: 400,
5151
delay: i * 200,
52+
useNativeDriver: false,
5253
}),
5354
Animated.timing(self.state.heights[i], {
5455
toValue: self.props.barHeight / 3,
5556
duration: 400,
57+
useNativeDriver: false,
5658
}),
5759
]);
5860
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /