Home > Back-end >  React Native Reanimated not working (in Expo app)
React Native Reanimated not working (in Expo app)

Time:12-06

Animations simply aren't happening. I've created a very simple App Screenshot

I've tested the app in the Android Studio emulator and on a physical device but it fails on both.

CodePudding user response:

Since you're using Reanimated, you should import 'Animated' from 'react-native-reanimated', in your code you're importing it from 'react-native'. So, correcting your imports:

import { Button, View } from "react-native";
import Animated, {
  useAnimatedStyle,
  useSharedValue,
  withTiming,
} from "react-native-reanimated";
//...
  • Related