Skip to content

Conversation

@bartlomiejbloniarz
Copy link
Contributor

@bartlomiejbloniarz bartlomiejbloniarz commented May 5, 2025

Summary

This PR brings back the Shared Element Transition feature to reanimated (within a limited scope and behind a feature flag).

Current limitations:

  • animations with native modals don't work on iOS (the modal is displayed over the Shared Element). This can be fixed by plugging the Shared Element into the Window, instead of the React's RootVIew.
  • can't define custom progress (swipe back) transitions (it just isn't implemented yet, it was easier to hard code)
  • progress transitions animate less props than basic ones (for the same reason as above)
  • on iOS there are still some issues with header height (e.g. the [SET] Modals) example
  • there are some performance bottlenecks, that stem from transforms being recalculated too eagerly (this requires some changes to how we recognize whether to start a transition)
  • we have to use a workaround for rnscreens to not keep a snapshot of the transitioning view on the popped screen. Currently the fix is only available in our patch, but should be soon merged into rnscreens.

Test plan

@slorber
Copy link
Contributor

slorber commented May 7, 2025

Hey 👋

Just backlinking to the PR announcement tweet for demos and community comments: https://x.com/BBloniarz_/status/1919390653856829566

@elozino-eryk
Copy link

Hi @bartlomiejbloniarz nice work you are doing.

Is there a way we can get a code demo of it in new Arch? Currently, I am unable to get it to work with the code sample provide in the docs.

Thanks ❤️

@bglgwyng
Copy link

@elozino-eryk you can see the set of examples by run yarn start in apps/fabric-example

@bartlomiejbloniarz bartlomiejbloniarz marked this pull request as ready for review November 4, 2025 15:29
@bartlomiejbloniarz bartlomiejbloniarz changed the title Shared Elements Transitions on the New Architecture Shared Element Transition on the New Architecture (feature flag) Nov 4, 2025
@piaskowyk piaskowyk self-requested a review November 5, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants