react-navigation-shared-element icon indicating copy to clipboard operation
react-navigation-shared-element copied to clipboard

Same image on page causes confusion

Open dan-fein opened this issue 4 years ago • 2 comments

Hi all -

I have a list of "Thing"s and sometimes they appear multiple times on the same screen. They have the same ID (they're the same "Thing" so naturally using that ID like this: id={thing.${things[0].id}.image} causes the image to go to any of them. I'm wondering what you guys do for cases like this?

Do you advise for creating unique IDs and sharing those from screen to screen as props, so it's not tied to the Thing overall but rather this instance of a Thing?

Anything else to consider?

Thanks in advance!

dan-fein avatar Jan 20 '21 00:01 dan-fein

How did you end up getting around this issue, @danielfein? I just came across the same thing.

Update: I ended up just passing the id plus a random string and that helped with the duplicate issue.

darrylyoung avatar Feb 24 '21 10:02 darrylyoung

So I think the most pungent question here is, what would you like to happen? As in, what would you like to see as in the visual transition on the screen? Once that is clear, I think it will be much clearer on how to reason about how to achieve it

IjzerenHein avatar Sep 06 '21 22:09 IjzerenHein