0

I am working on a pulse animation in react native everything working fine as I expect but only issue I am facing is that the view is not looping. The animation run only once. I have done all the reanimated setup like adding the plugin and adding it on top of the app.js file. Here is my code. If you have pulse animation code so it will gonna also help me.

import {MotiView} from 'moti';
import {Easing} from 'react-native-reanimated';
import {StyleSheet} from 'react-native';

{[...Array(3).keys()].map(index => (
      <MotiView
        key={index}
        from={{opacity: 0.7, scale: 1}}
        animate={{opacity: 0, scale: 4}}
        transition={{
          loop: true,
          type: 'timing',
          duration: 1000,
          easing: Easing.out(Easing.ease),
          delay: index * 400,
          repeatReverse: false,
        }}
        style={[
          StyleSheet.absoluteFillObject,
          {
            width: 60,
            height: 60,
            borderRadius: 30,
            backgroundColor: '#f9d1d1',
          },
        ]}
      />
    ))}
Azeez
  • 368
  • 2
  • 10

0 Answers0