Skip to content

Conversation

piaskowyk
Copy link
Member

@piaskowyk piaskowyk commented Sep 25, 2025

Description

This PR fixes custom swipe-back transitions. The issue arose because, in the new version of React Native, they changed the way to obtain the shadow node wrapper. Since the ref to the screen is a native ref and we only need this on Fabric, it was possible to simplify the way we obtain that reference. Additionally, I found a small issue with the propagation of the ref and fixed it in the Screen implementation.

before after
image
Screen.Recording.2025-09-25.at.13.22.20.mov

Example: https://github.com/software-mansion/react-native-reanimated/blob/main/apps/common-app/src/apps/reanimated/examples/ScreenTransitionExample.tsx

Checklist

@piaskowyk piaskowyk requested a review from kkafar September 25, 2025 11:43
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good. Thank you!

export type HostInstance = {
__internalInstanceHandle: Record<string, any>;
__nativeTag: number;
_viewConfig: Record<string, unknown>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess our definitions were already outdated, but will it work with 80, 81 & 82 now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it with all of these versions (only with 0.81), but to my knowledge, it should work with all of them.

@kkafar
Copy link
Member

kkafar commented Sep 29, 2025

I'll merge it once I get to test this (soon)

@kkafar kkafar merged commit 60b4d8e into main Oct 7, 2025
3 checks passed
@kkafar kkafar deleted the @piaskowyk/fix-custom-screen-transitions branch October 7, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants