IjzerenHein / react-navigation-shared-element

React Navigation bindings for react-native-shared-element 💫
https://github.com/IjzerenHein/react-native-shared-element
MIT License
1.27k stars 124 forks source link

Problem with shared element not doing the intended transition with a component in a flatlist. #174

Closed dochonglo closed 3 years ago

dochonglo commented 3 years ago

Below is my code after following the correct set up guides.

What's different is that I have a Flatlist rendering a component (which I import) and I pass the sharedElementID to that component. However, the intended animation still doesn't work. Below is a screenshot of my code.

Screen Shot 2021-07-20 at 12 28 30 AM (2)

Could someone please point me in the right direction as to solving this issue? Thanks! :)

nandorojo commented 3 years ago

It seems like your IDs have no unique identifiers. Make sure that you give a unique ID from each list item so that the screens know what to transition. It should be something like image-${id}