You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using @react-navigation/stack, and we are animating our UI search bar with the <Animation.View entering={FadeIn} exiting={FadeOut} .../> and everything insides <Animation.View layout={Layout} .../>
The UI animation works right in Android and in iOS. But, only in iOS, after do a navigate, and then going back, seems like something is break and the Layout animation doesn't work.
We tried with detachPreviousScreen to be sure that the screen is not unmounted but the bug still appears.
I can confirm, exactly the same thing happens for me on iOS. It also happens when using native-stack. However, it works ok if screen looses focus because of tab navigation change.
As a workaround I'm changing the key on wrapping container based on isFocused variable, to trigger remounting all animated components inside. It works, but it requires bunch of hacks to prevent layout animations run on those
elements because of this key change.
We are experiencing the same issue. Layout animation works fine but after navigating to another screen, the animation stop working.
The issue is only encountered on iOS, debug/release build, simulator and real device.
Reacted by Gheorghe, Nicolas Cavallin, s-t-sa, Thanaen, Matin Zadeh Dolatabad, Maxime Lainé, Matt, Matt Tysor, Alexander Vauer, Bjarki Kjartansson and 1 more
Hey Same here, there's enough reproductions above so i will skip that - layout breaks on stack navigation screen change and going back, however tried to re-render on focus hack but no that didn't work.
Hey Same here, there's enough reproductions above so i will skip that - layout breaks on stack navigation screen change and going back, however tried to re-render on focus hack but no that didn't work.
To make the hack works you need to change the key props on the Animated.View component
Hi, @nicolascavallin, I can confirm the issue still exist. With native-stack. When I'm navigating from material-top-tabs to native-stack, then back to top-tabs, all layout animations in top-tabs navigator are broken.
It was resolved for me.
I originally created a reproduction to show the issue still exists, but it seems to be fixed now. I was also only having the issues on iOS.
I think the reason that david was able to have his issue fixed, at least per the example he included, is that this only occurs when navigating from one stack to another. If you are navigating between screens within the same stack this issue indeed has been fixed in previous merges. I am using
and still seeing this issue when navigating between bottom tabs stack and another native stack at the same level as the bottom tabs stack. However, if i keep navigation between screens to within the same stack the issue is not a problem.
Reacted by Seth Setse, Artem Astrouski, Andrew and mrakus-sofomo
What version can we expect this to be deployed with ? Thank you for fixing btw. Love the layout animations and was bummed this issue was making them less usable :)
For me on "react-native-reanimated": "^3.9.0-rc.0" navigating between different stacks works. The stack i am navigating to exists outside of the tab navigation stack. All are native stacks as well.
Activity
emzet93 commentedon Jun 1, 2023
I can confirm, exactly the same thing happens for me on iOS. It also happens when using
native-stack. However, it works ok if screen looses focus because of tab navigation change.As a workaround I'm changing the key on wrapping container based on
isFocusedvariable, to trigger remounting all animated components inside. It works, but it requires bunch of hacks to prevent layout animations run on thoseelements because of this key change.
fukemy commentedon Jun 5, 2023
did the animation work for android? I can not animate anything with FlatList Android
nicolascavallin commentedon Jun 6, 2023
Yes, in my case everything works as expected in Android
dayze commentedon Jul 3, 2023
We are experiencing the same issue. Layout animation works fine but after navigating to another screen, the animation stop working.
The issue is only encountered on iOS, debug/release build, simulator and real device.
Here is a minimal reproduction repository
And the following capture from iOS simulator :
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-07-03.at.11.28.46.mp4
s-t-sa commentedon Jul 4, 2023
Hey Same here, there's enough reproductions above so i will skip that - layout breaks on stack navigation screen change and going back, however tried to re-render on focus hack but no that didn't work.
dayze commentedon Jul 5, 2023
To make the hack works you need to change the
keyprops on theAnimated.Viewcomponent18 remaining items
nicolascavallin commentedon Oct 11, 2023
@Latropos I've created a new repro here: https://github.com/nicolascavallin/reanimated-bug
Basically, the existing keys lost their layout animation ability after the navigation with the
@react-navigation/stack. Not the new ones.Let me know how I can help.
Thanks in advance.
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-10-11.at.17.53.02.mov
batuhansahan commentedon Nov 30, 2023
Any update on this. with
react-native-reanimated = 3.6.0still experiencing with the native stack.nicolascavallin commentedon Dec 1, 2023
Hey @batuhansahan are you sure that with the
native-stack? Because it was solved here #4997.I reopened the issue because I'm having trouble with the
stackby react-navigation (not the native one)AndrewTkachuk42 commentedon Dec 5, 2023
Hi, @nicolascavallin, I can confirm the issue still exist. With native-stack. When I'm navigating from material-top-tabs to native-stack, then back to top-tabs, all layout animations in top-tabs navigator are broken.
"react-native": "0.72.6",
"@react-navigation/material-top-tabs": "^6.6.5",
"@react-navigation/native-stack": "^6.9.17",
"react-native-reanimated": "^3.6.1",
Also there is freezeOnBlur: true option enabled.
It's iOS only. Android works fine.
Hope this will help.
davidjbng commentedon Dec 6, 2023
It was resolved for me.
I originally created a reproduction to show the issue still exists, but it seems to be fixed now. I was also only having the issues on iOS.
Using the following package versions
See my working example here: https://github.com/davidjbng/reanimated-layout-animation-bug
Simulator.Screen.Recording.-.iPhone.15.-.2023-12-06.at.14.58.14.mp4
Karthik-B-06 commentedon Jan 30, 2024
I am still having this issue,
The
LinearTransitionanimation breaks after navigation.sguidotti commentedon Feb 10, 2024
I think the reason that david was able to have his issue fixed, at least per the example he included, is that this only occurs when navigating from one stack to another. If you are navigating between screens within the same stack this issue indeed has been fixed in previous merges. I am using
and still seeing this issue when navigating between bottom tabs stack and another native stack at the same level as the bottom tabs stack. However, if i keep navigation between screens to within the same stack the issue is not a problem.
bartlomiejbloniarz commentedon Mar 25, 2024
The issue was fixed in #5495
sguidotti commentedon Mar 25, 2024
What version can we expect this to be deployed with ? Thank you for fixing btw. Love the layout animations and was bummed this issue was making them less usable :)
bartlomiejbloniarz commentedon Mar 26, 2024
@sguidotti It will be available in the next release, but you can test it now via nightly
iamjoshua commentedon Apr 4, 2024
I am still encountering this issue with tabs using the nightly build:
reanimated: 3.9.0-nightly-20240403-6dc1e6fbf
expo: 50.0.14
Initially the layout transition works correctly, then after navigating to another tab and then returning, the transitions no longer occur.
sguidotti commentedon Apr 5, 2024
For me on "react-native-reanimated": "^3.9.0-rc.0" navigating between different stacks works. The stack i am navigating to exists outside of the tab navigation stack. All are native stacks as well.