title: Create a loop with react-native-reanimated
body: <p>I'm trying to create a Blinking function in an App using hooks and react-navigation 5 - No classes. 
  "react-native-reanimated" is new to me. I'm more familiar with Animated so this is why I need some help here. Thank you!</p>
  
  <pre><code>import React, { useState, useEffect, Component, useCallback } from "react";
  import {
    StyleSheet,
    Text,
    View
  } from "react-native";
  import Animated, { Easing } from "react-native-reanimated";
  import { loop } from "react-native-redash";
  
  
  function BlinkIt(props){
       const [fadeAnim] = useState(new Animated.Value(0));
        useEffect(() =&gt; {
          Animated.set(
           fadeAnim,
            loop({
              duration: 5000,
              autoStart: true,
              boomerang: true
            })
          )
        }, []);
        return (
      &lt;Animated.View // Special animatable View
        style={{
          ...props.style,
          opacity: fadeAnim
        }}
      &gt;
        {props.children}
      &lt;/Animated.View&gt;
        );
  }
  
  
  export default function App() {
      return (
        &lt;View style={styles.container}&gt; &lt;BlinkIt&gt;&lt;Text&gt;The text is blinking&lt;/Text&gt;&lt;/BlinkIt&gt;&lt;/View&gt;
      );
  }
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
      paddingTop: Constants.statusBarHeight,
      backgroundColor: '#ecf0f1',
      padding: 8,
    },
  
  });
  </code></pre>