Skip to content

Chrome ref issue #481

Answered by irudoy
lilahz asked this question in Q&A
Apr 20, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Can you provide an isolated repro repository? It would be the best option and I could find a solution quickly.

Otherwise, I need a complete code snippet and some info. React version? Browser version which fails?
This example works well in that browser? https://dromru.github.io/react-photoswipe-gallery/?path=/story/gallery--simple

Based on the code provided earlier, you're trying to do something like this:

Object.keys(obj).map((key) => {
  // ...
  const Item = <Item>{({ ref, open }) => <img ref={ref} onClick={open} />}</Item>
  // ...
})

Can you provide exactly what you returning from the map callback?

Do you use an Item component outside of map callback somewhere?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lilahz
Comment options

@irudoy
Comment options

@lilahz
Comment options

@irudoy
Comment options

Answer selected by irudoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants