Skip to content
\n

Component ViewPhoto

\n
<div key={v4()}>\n            <article className={`${styles.photoItem} ${styles.photoItemOverlay}`}  data-photo-modal-medium-id={medium._id}>\n                <ImageComponent medium={medium} />\n            </article>\n        </div>
\n

When specifying v4(), the library still uses its keys, how can I fix this?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

You should supply the key attribute as part of the photo object in this case.

\n

https://react-photo-album.com/documentation#Photo

","upvoteCount":1,"url":"https://github.com/igordanchenko/react-photo-album/discussions/110#discussioncomment-5695475"}}}

How to specify your key for photo blocks #110

You must be logged in to vote

You should supply the key attribute as part of the photo object in this case.

https://react-photo-album.com/documentation#Photo

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@GreenEyeInvestor

Answer selected by igordanchenko
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