Nice article, it was really helpful... though I noticed that onclick on any of the pictures on your personal blog it displays the image in modal view, how can that be achieved?
I didn't include that in this article as to not make it too long. Nevertheless, you can achieve the Modal by adding an onClick handler to each image. That handler should set a src variable which is that image's URL. When the src variable is defined, then a new <div> should be rendered with position: fixed and a almost black background. This new <div> should contain the image in a bigger size.
Hopefully this was clear enough, if not DM me on Twitter and I can try to help further :)
Bernardo Belchior Hi Bernardo,
interesting sample!
just following up your note above... Could you pls post few lines of code how onClick=... works for modal? My simple handler isn't fired.
I had some good luck integrating this tutorial with simple-react-lightbox just had to change around some of the CSS to account for the extra div it adds to the output: