Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Reanimated Layout Transitions not working #1284

Open
1 of 2 tasks
JustJoostNL opened this issue Jul 28, 2024 · 2 comments
Open
1 of 2 tasks

React Native Reanimated Layout Transitions not working #1284

JustJoostNL opened this issue Jul 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JustJoostNL
Copy link

Current behavior

I'm using the FlashList component and in the renderItem it's rendering an Animated.View (from react-native-reanimated), which has a layout prop: LinearTransition.springify().

Unfortunately, no layout animation is happening.

Expected behavior

The layout transition/animation should work as expected.

To Reproduce

<FlashList
  data={data}
  renderItem={({ item }) => (
     <Animated.View layout={LinearTransition.springify()}>
           {/* children here */}
      </Animated.View
  )}
  estimatedItemSize={100}
  keyExtractor={(message) => message.id}
/>

Platform:

  • iOS
  • Android

Environment

v1.6.4

@JustJoostNL JustJoostNL added the bug Something isn't working label Jul 28, 2024
@zguo123
Copy link

zguo123 commented Jul 30, 2024

It appears you are using LinearTransition in your code. According to the documentation:

For layout animations, similarly to the React Native API, you need to call prepareLayoutAnimationRender() before removing or inserting an element that you want to animate. Note that we currently support only entering and exiting animations. Layout transitions are not supported as of now.

You can find more context here.

@JustJoostNL
Copy link
Author

JustJoostNL commented Jul 30, 2024

Can this be added? This is a pretty big deal for most people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants