score:0

i believe you need isopen. try

  return (
        <lightbox 
            isopen
            images={images}
            onclose={this.onclose}
                onclickprev={this.gotoprevious}
                onclicknext={this.gotonext}
        />  
    );

score:3

it is not obvious from the documentation, but react-images will not render a grid/or a gallery of your images. it will only render the lightbox component once a image is clicked.

so, in order to get what you want (which is a gallery of some kind, and the light box component applied to images of that gallery, then you need more than just 'react-images'. you can render the images on their own, or with another gallery/grid npm library.

for example you can render an array of images with just the normal <img> tag. but, be sure that each image has the "onclick" set to be a function that opens the lightbox. see below:

...

 <grid imagesarray={thumbs} onclick={this.openlightbox.bind(this)} columns={3} padding={3} />
<lightbox
	images={images}
	isopen={this.state.lightboxisopen}
	onclickprev={this.gotoprevious}
	onclicknext={this.gotonext}
	onclose={this.closelightbox}
	currentimage={this.state.currentimage}
/>


Related Query

More Query from same tag