N
N
Newbie Ivanovich2019-09-08 17:14:15
Images
Newbie Ivanovich, 2019-09-08 17:14:15

What is the best react component to use to display an array of images with a preview (small) and a view (large)?

there is an array of pictures

{
    "albumId": 1,
    "id": 1,
    "title": "accusamus beatae ad facilis cum similique qui sunt",
    "url": "https://xxxxx.com/600/92c952",
    "thumbnailUrl": "https://xxxxx.com/150/92c952"
  },

in the preview, you need to display a small image "thumbnailUrl".
and when clicked, display a large "url"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yustas Alexu, 2019-09-08
@NovichokIvanovich

All you need in this case is react-router to redirect the user to another route when clicking on the image. On this route, there will be a big picture.
The path to the big image will need to be passed through props to the component to display the big image.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question