We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e87d8fc + 4d42deb commit 8c1d69bCopy full SHA for 8c1d69b
src/index.js
@@ -19,11 +19,12 @@ export default class SvgAnimatedLinearGradient extends Component {
19
],
20
frequence: props.duration / 2
21
}
22
+ this._isMounted = false;
23
this._animate = new Animated.Value(0)
24
this.loopAnimation = this
25
.loopAnimation
26
.bind(this)
- }
27
+ }
28
offsetValueBound(x) {
29
if (x > 1) {
30
return '1'
@@ -34,11 +35,14 @@ export default class SvgAnimatedLinearGradient extends Component {
34
35
return x
36
37
componentDidMount(props) {
38
+ this._isMounted = true
39
this.loopAnimation()
40
-
41
+ componentWillUnmount() {
42
+ this._isMounted = false
43
44
loopAnimation() {
45
+if(!this._isMounted)return;
46
// setup interpolate
47
let interpolator = interpolate(this.state, {
48
offsetValues: ['1', '1.5', '2']
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments