import React, { Component } from "react"; import { Animated, TextInput, Text, View, StyleSheet, Button } from "react-native"; const force0 = 100; // px/ms const g = 10; const t = 1000; class App extends Component { state = { animationProgress: new Animated.Value(0), alpha: 70, }; fadeIn = () => { //start animation Animated.sequence([ Animated.timing(this.state.animationProgress, { toValue: 1, duration: t, useNativeDriver: true }), Animated.timing(this.state.animationProgress, { toValue: 1, duration: 250, useNativeDriver: true }), Animated.timing(this.state.animationProgress, { toValue: 0, duration: 500, useNativeDriver: true }), ]).start(); }; fadeStop = () => { Animated.timing(this.state.animationProgress).stop(); }; render() { return ( {/*komponent animacyjny*/} {/*komponent statyczny*/}