title: Slide up down animation in the react native
body: <p>I am using animation for up and down in the react native, But the animation just slide from up to down and then stop at the bottom i want to move it up and down continuously. I have also used animation loop so please check and provide me solution for this</p>
  <pre><code>import React, { useEffect, useState } from 'react'
  import { Text, View, Animated, Easing, StyleSheet } from 'react-native'
  import LoaderLogo from '../../icons/commonicons/LoaderLogo'
  import { Loadericon } from '../../constants/Image';
  import LinearGradient from 'react-native-linear-gradient';
  import { dynamicSize } from '../sizechoose';
  
  const amimationScreen = () =&gt; {
      const startValue = new Animated.Value(0);
      const endValue = dynamicSize(225);
  
      const startValue2 = new Animated.Value(225);
      const endValue2 = dynamicSize(0);
      const duration = 5000;
  
      useEffect(() =&gt; {
  
          Animated.sequence([
              Animated.timing(startValue, {
                  toValue: endValue,
                  duration: duration,
                  useNativeDriver: true,
              }),
              Animated.timing(startValue2, {
                  toValue: endValue2,
                  duration: duration,
                  useNativeDriver: true,
              })
          ]).start()
  
      }, [startValue, endValue, duration]);
  
      return (
          &lt;Animated.View style={[{ transform: [{ translateY: startValue }] }]}&gt;
         &lt;View style={{backgroundColor:'red',height:10,width:100}}&gt;
              &lt;/View&gt;
          &lt;/Animated.View&gt;
      )
  }
  
  
  export default amimationScreen
  </code></pre>
  <p>I also tried with react-native-animatable package but it is not good to use for me as it starts animation from the top of the screen.</p>