Open TijsM opened 3 years ago
I got the exact same issue... here are my versions in case it helps:
"react-native-shared-element": "0.7.0",
"react-navigation-shared-element": "^3.1.3",
"@react-navigation/native": "~5.9.2",
"@react-navigation/stack": "^5.14.5",
"react-native-screens": "~3.4.0",
Hi, this problem is not specific to the native extensions, but to react-navigation. Moving this to the react-navigation-shared-element
repo
I'm sorry this answer seems so late, but, only those who come later. I faced the same problem and the reason was I have two Stack in my app. One with react-navigation's createStackNavigator and the other with createSharedElementStackNavigator and the shared element transition only works the first time. After bringing both back to createSharedElementStackNavigator. Everything works fine. So try to check your project again
hi @phuctranba
I'll definitely try this, I stopped using react-navigation-shared-element for this reason 😅
thanks!
A late response from me as well but my issue was that I have my Stack navigator nested inside a Bottom tabs navigator which resulted in the sharedElements
prop of the stack screen getting called with the current route only on the first navigation. Taking the screen out of the Bottom tabs worked but it might mess with your overall navigation architecture :(
bug
Expected behavior
The shared element transition works on all cards and when going back
Demo
https://user-images.githubusercontent.com/36442007/135582689-e0d557b5-f31f-4e88-884b-ce5d74958afa.mov
Code
app.tsx
Card.tsx
Detail.tsx