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

Animate shared "complex" component #5836

Open
MatteoBuffo opened this issue Mar 26, 2024 · 0 comments
Open

Animate shared "complex" component #5836

MatteoBuffo opened this issue Mar 26, 2024 · 0 comments
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@MatteoBuffo
Copy link

Description

Hello. My goal is to animate a React Native Paper Card.Cover component between two screens. Unfortunately, that doesn't seem to work.
I followed the steps reported in these doc pages:

Am I missing something? Or is it this related to this limitation:
The layout for shared view children is not computed during the transition.
?

Videos are provided below.

Library Version
@react-navigation/native ^6.9.26
expo ~50.0.13
expo-status-bar ~1.11.1
react 18.2.0
react-native-paper ^5.12.3
react-native-safe-area-context 4.8.2
react-native-screens ~3.29.0

Steps to reproduce

  1. Do all necessary setup to make animations between screens work in your local environment at all (in my case it was necessary to generate the native Android folder and a development build with EAS)
  2. Open the app. The navigator is made of two screens - Home and Details - you basically navigate from Home to Details by pressing the shared, animated element. The animation consist in expanding/reducing the shared component width when navigating between screens
  3. Press the Card.Cover and notice that the animation isn't working
  4. Open the app/components/MyAnimatedComponent.tsx
  5. Try the other components and see their animations are working
button.mp4
animatedImage.mp4
cardCover.mp4

Snack or a link to a repository

https://snack.expo.dev/@mbuffo/reanimated-custom-shared-component

Reanimated version

~3.6.2

React Native version

0.73.5

Platforms

Android

JavaScript runtime

None

Workflow

Expo Dev Client

Architecture

None

Build type

None

Device

Real device

Device model

Samsung Galaxy A9 (Android 9), Samsung Galaxy S20 FE (Android 13)

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided labels Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

1 participant