And in the inner stack navigators, when i do 'navigation.navigate' the animation works fine.
but when i do 'navigation.goBack()', the screen just flashes and pop the current screen and replace the screen very suddenly.
it seems very unsmooth, and while flashing i can see the white background behind. I really want to fix it since my app's background is dark color..
I found that when i add 'entering' prop to the animated.view from 'react-native-reanimated', this issue happens.
not only entering, when i add animation using useanimatedstyle , the same problem arises.
but strangely, when i enable header and press the back button at the header, it works fine(the animation)
look at the video i attached, first one is my current situation. you can see the screen flashing.
but in the second trial, when i press the back button at the header the transition is very smooth.
Description
I'm using nested Native Stack Navigator.
And in the inner stack navigators, when i do 'navigation.navigate' the animation works fine. but when i do 'navigation.goBack()', the screen just flashes and pop the current screen and replace the screen very suddenly. it seems very unsmooth, and while flashing i can see the white background behind. I really want to fix it since my app's background is dark color..
I found that when i add 'entering' prop to the animated.view from 'react-native-reanimated', this issue happens. not only entering, when i add animation using useanimatedstyle , the same problem arises.
but strangely, when i enable header and press the back button at the header, it works fine(the animation) look at the video i attached, first one is my current situation. you can see the screen flashing. but in the second trial, when i press the back button at the header the transition is very smooth.
https://user-images.githubusercontent.com/49435892/227789442-fb32668f-7a31-4ffe-84b5-ecef96348957.mov
i changed component rendering part simply. and it's not just only problem of this stack. the other stacks also have same problem.
in the snack, it works fine but with the same code, in my app, it does not work... :(
Expected behavior
when 'navigation.goBack()' the animation for transition performs smoothly.
Environment
| react-native |"0.70.0", | node | | npm or yarn | 9.5.0
Steps to reproduce
i attached snack url
just adding animation to the animated view to the child screen causes this problem.
Snack or a link to a repository
https://snack.expo.dev/@aubri61/rn-goback-error
Reanimated version
2.14.4
React Native version
0.70.0
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes