import React, { useRef } from "react";import { Animated, Text, View, StyleSheet, Button, SafeAreaView } from "react-native";const App = () => { // fadeAnim will be used as the value for opacity. Initial Value: 0 const fadeAnim = useRef(new Animated.Value(0)).current; const fadeIn = () => { // Will change fadeAnim value to 1 in 5 seconds Animated.timing(fadeAnim, {toValue: 1, duration: 5000}).start(); }; const fadeOut = () => { // Will change fadeAnim value to 0 in 3 seconds Animated.timing(fadeAnim, {toValue: 0, duration: 3000}).start(); }; return ( Fading View!