React: handling updating settings without breaking component?
Briefly

It’s crucial to ensure that when the LightGallery instance is re-initialized, it retains the necessary settings and properly binds to the new HTML elements.
Check the mounting lifecycle of your component to make sure that when settings change, the LightGallery instance is properly cleaned up and restarted with the latest configuration.
Read at SitePoint Forums | Web Development & Design Community
[
|
]