Skip to content

Instantly share code, notes, and snippets.

@nandorojo
Created November 10, 2020 22:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nandorojo/762a2cc57128de1b6ce7fc40f7106873 to your computer and use it in GitHub Desktop.
Save nandorojo/762a2cc57128de1b6ce7fc40f7106873 to your computer and use it in GitHub Desktop.
React Native Reanimated v2 Shared Element Transition Image Gallery
@RayVR
Copy link

RayVR commented Jun 18, 2021

Maybe I messed something up or reanimated library changed since you posted, but I think onClose (line 130) should go through runOnJS

@nandorojo
Copy link
Author

Oh yeah that didn’t exist when I made this

@RayVR
Copy link

RayVR commented Jun 18, 2021

Makes sense. Thanks for sharing this (and of course Moti, which is fantastic).

I'm curious, did you ever run a version of this code in a release build of react native? Using your code as a starting point, I built a gallery feature today but the app crashes loading this screen in release builds (debug on device has no issues.)

@nandorojo
Copy link
Author

I’ve actually been facing the same issue in general with RN as of 3 days ago. Still trying to figure out why. But I don’t think it’s related to this — I’m not using it in my app, it was just a proof of concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment