Skip to content

Instantly share code, notes, and snippets.

View saumaypaul20's full-sized avatar
💭
Working on React-Native, Reactjs

Saumay Paul saumaypaul20

💭
Working on React-Native, Reactjs
View GitHub Profile
@saumaypaul20
saumaypaul20 / PulseAndRotateAnimation.js
Last active May 22, 2024 19:12
This React Native code animates an image with a continuous rotation loop and a pulsating effect using the `Animated` API. Snack- https://snack.expo.dev/@saumay.paul/intrigued-blue-crackers
import React, { useEffect, useRef } from 'react';
import { Animated, View, StyleSheet,Easing } from 'react-native';
const IMAGE_URI= "https://www.airstudios.com/wp-content/uploads/2024/02/Logo-Complex-3_1.svg"
const CombinedAnimation = () => {
const rotateValue = useRef(new Animated.Value(0)).current;
const pulseValue = useRef(new Animated.Value(1)).current;
useEffect(() => {
// Rotate animation
Animated.loop(