react-masonry-component: handleImagesLoaded triggers multiple times

handleImagesLoaded triggers multiple times, I am using: onLayoutComplete={handleImagesLoaded} with function inside the createClass onLayoutComplete={this.handleImagesLoaded} it triggers 2 times , otherwise its 4 or 5

About this issue

Most upvoted comments

@arpecop @indapublic I don’t think this is a bug in Masonry or React Masonry Component.

the layoutcomplete event fires every time Masonry completes a layout. Do you find your layout updates several times on screen? This can happen as images are downloaded.

If you want to capture 1 event every X seconds etc, you could try using Lodash’s throttle or debounce functions.

http://masonry.desandro.com/events.html#layoutcomplete