Skip to content

feat(set): SharedTransitionBoundary#9435

Merged
bartlomiejbloniarz merged 24 commits into
software-mansion:mainfrom
kasperski95:@kasperski95/set-boundary
Jun 15, 2026
Merged

feat(set): SharedTransitionBoundary#9435
bartlomiejbloniarz merged 24 commits into
software-mansion:mainfrom
kasperski95:@kasperski95/set-boundary

Conversation

@kasperski95

@kasperski95 kasperski95 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This MR introduces <SharedTransitionBoundary>.
It cherrypicks commits from #9107 and #9132 and resolves conflicts.

Those MR are combined into one to keep main branch consistent.

NOTE: Found a non-deterministic bug on Android (check recording at 1:41). Not sure if this is a regression.

Test plan

  1. Check the new [SET] Screenless Basic example
  2. Check [SET] * examples for regressions in FabricExample app on iOS and on Android

Attachments

iOS after

ios-after-compressed.mp4

Android after

android-after-compressed.mp4

bartlomiejbloniarz and others added 17 commits May 18, 2026 11:30
This PR introduces a new concept for SETs, called SharedTransitionBoundary. It is supposed to replace the current approach where we use Screens from RNScreens to separate which shared elements should be displayed. With the new approach one can still wrap a screen to get the old behavior, but also new patterns are available, such as running a SharedTransition within one RNScreen.

Main pros of this solution:
- easier to adapt to different navigators (this allows us to use the TabNavigator with no weird native changes)
- more customization options for users
- no native dependency on RNScreens

Cons:
- the minimal manual setup that has to be done to enroll a RNScreen in running transitions
- we have to guess the target boundary when doing a native back gesture on iOS. This should not be a big problem for the usual use-case

Screenless example

ghstack-source-id: 0464881
Pull Request resolved: software-mansion#9036
Summary:

Test Plan:
Summary:

Test Plan:

ghstack-source-id: 22f8029
Pull Request resolved: software-mansion#9037
…re-mansion#9053)

This updates React Navigation with fixes to `useIsFocused` behavior to
avoid workarounds for SET.

It also disables `detachInactiveScreens`, which seems to conflict with
SETs. Note that it'll be removed in React Navigation 8, so this is
temporary.

https://github.com/user-attachments/assets/e1ba5aca-1fe2-44c3-9a50-7088079c0da2

---------

Co-authored-by: Bartłomiej Błoniarz <bartlomiej.bloniarz@swmansion.com>
@kasperski95 kasperski95 force-pushed the @kasperski95/set-boundary branch from c634220 to 8fff62d Compare May 18, 2026 13:18
@kasperski95 kasperski95 changed the title Draft: feat(set): SharedTransitionBoundary feat(set): SharedTransitionBoundary May 18, 2026
@kasperski95 kasperski95 marked this pull request as ready for review May 18, 2026 17:20
@tomekzaw tomekzaw self-requested a review May 26, 2026 09:10

@tomekzaw tomekzaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good overall, left couple of comments

Comment thread packages/react-native-reanimated/Common/NativeView/CMakeLists.txt Outdated
Comment thread packages/react-native-reanimated/src/component/SharedTransitionBoundary.tsx Outdated
Comment thread packages/react-native-reanimated/src/component/SharedTransitionBoundary.tsx Outdated
Comment thread packages/react-native-reanimated/src/specs/SharedTransitionBoundaryProvider.ts Outdated
bartlomiejbloniarz and others added 3 commits June 11, 2026 14:36
…ndary

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…dary

# Conflicts:
#	apps/fabric-example/ios/Podfile.lock
#	packages/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/SharedTransitions.cpp
@bartlomiejbloniarz bartlomiejbloniarz added this pull request to the merge queue Jun 15, 2026
Merged via the queue into software-mansion:main with commit ae7306d Jun 15, 2026
20 of 21 checks passed
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.

4 participants