react-native-reanimated: Entering and Exiting animations doesn't work with react new architecture

Description

Hi, entering and exiting animations does not work at all with the new architecture, there is no error and the element appears but without any animation. Works fine with the old architecture. I have tried with canary versions too but it doesn’t solve the issue.

Steps to reproduce

With the given versions, this code won’t work on the new architecture but works well on the old architecture.

import { useState } from "react";
import { Button, View } from "react-native";
import Animated, { SlideInLeft, SlideOutDown } from "react-native-reanimated";

function App(): JSX.Element {
  const [animate, setAnimate] = useState(true);

  return (
    <View style={{ paddingTop: 100 }}>
      {animate && (
        <Animated.View
          entering={SlideInLeft.duration(2000)}
          exiting={SlideOutDown.duration(2000)}
        >
          <View style={{ backgroundColor: "orange", height: 30, width: 30 }} />
        </Animated.View>
      )}
      <Button title="animate" onPress={() => setAnimate(!animate)} />
    </View>
  );
}

export default App;

Snack or a link to a repository

Reanimated version

3.6.2

React Native version

0.73.4

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (7 by maintainers)

Most upvoted comments

In react native with expo sdk 52 still don’t working. all exiting animation and some of the entering

@faljabi

There seems to be a problem with RN 0.76. Layout Animations should work fine on 0.75

Ok, I didn’t find this information. Can’t wait for it !