In this recipe we will create a timeline of images, then we will allow the user to press any of the images to display it with a black background and the image in the center of the screen.
We will use an opacity animation for the background and we will slide in the image from their original position.
Let's create an empty app; we are going to call it
PhotoViewer. Feel free to use any other name, just make sure to set the correct name when registering the bootstrap component.
In addition, we need to create three files for this project.
src/MainApp.js to display the timeline,
src/PostContainer/index.js to show each image in the timeline and
src/PhotoViewer/index.js to show the selected image in full screen. ...