react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

Shared Transition stop working after a new screen pushed on top

Open booker-dragon opened this issue 2 years ago • 6 comments
trafficstars

Description

RootNativeStackNavigator |--SiblingScreen |--ParentNativeStackNavigator |-----ParentScreen |-----TransitionScreenA |-----TransitionScreenB

Im having a problem that the shared transition for TransitionScreenA and TransitionScreenB stopped working after I have pushed SiblingScreen on top of ParentNativeStackNavigator and go back

https://github.com/software-mansion/react-native-reanimated/assets/45155182/4efdcf2d-518b-4702-86a5-9606f846d565

Steps to reproduce

  1. Create nested native stack navigators
  2. Create share transition for the screens in the ParentNativeStackNavigator
  3. Push SiblingScreen on top of ParentNativeStackNavigator
  4. Go back to the previous screen
  5. Transitions stop working

Snack or a link to a repository

N/A

Reanimated version

3.3.0

React Native version

0.69.0

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

booker-dragon avatar Jun 27 '23 07:06 booker-dragon

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar Jun 27 '23 07:06 github-actions[bot]

Tried to debug and found that the react tag for the target view is updated For example, we have two views, 115 for source view and 120 for target view

After the sibling screen is pushed to the top, the target view react tag has been change, It is 115 and 140, something like that, for this reason, the react tag could not be used to retrieve the correct target view from _viewRegistry

booker-dragon avatar Jul 26 '23 06:07 booker-dragon

Any new insights to this? I have a similar and very weird bug occurring.

I get no Error messages, so I am assuming that the shared transition tags aren't found.

hazirmagron avatar Aug 22 '23 15:08 hazirmagron

Any new insights to this? I have a similar and very weird bug occurring.

I get no Error messages, so I am assuming that the shared transition tags aren't found.

My workaround is to place all the same in the same layer, so that it will not stack a higher level screen on top which cause the transition stopped

booker-dragon avatar Aug 23 '23 03:08 booker-dragon

Also having this issue with expo router v3 and expo SDK 50, where nested layout are just a product of the file based structure, so unfortunately I cannot use the workaround mentioned above by @booker-dragon. The only workaround I have is resetting the component with a key each time the screen is focused, but that causes obvious unnecessary re-renders and glitches. Are there any insights into this?

CalypsoTechLTD avatar Feb 05 '24 12:02 CalypsoTechLTD

Any updates to this? Also facing this issue, seems like a legitimate bug

alaughlin avatar Feb 16 '24 00:02 alaughlin

same issue

lemo-gizem avatar May 17 '24 09:05 lemo-gizem

same here

Bayramito avatar Jul 08 '24 07:07 Bayramito