diff --git a/app/containers/Loading.tsx b/app/containers/Loading.tsx index cd4ed285d..69cd6565a 100644 --- a/app/containers/Loading.tsx +++ b/app/containers/Loading.tsx @@ -22,15 +22,20 @@ interface ILoadingProps { theme?: string; } -class Loading extends React.PureComponent { +interface ILoadingState { + scale: Animated.Value; + opacity: Animated.Value; +} + +class Loading extends React.PureComponent { state = { scale: new Animated.Value(1), opacity: new Animated.Value(0) }; - private opacityAnimation: any; + private opacityAnimation?: Animated.CompositeAnimation; - private scaleAnimation: any; + private scaleAnimation?: Animated.CompositeAnimation; componentDidMount() { const { opacity, scale } = this.state; @@ -61,7 +66,7 @@ class Loading extends React.PureComponent { } } - componentDidUpdate(prevProps: any) { + componentDidUpdate(prevProps: ILoadingProps) { const { visible } = this.props; if (visible && visible !== prevProps.visible) { this.startAnimations(); @@ -107,8 +112,7 @@ class Loading extends React.PureComponent {