You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently facing the issue that I have 8 buttons that open one and the same lightbox component with varying props.
The documentary states that props are not reactive and that the key prop should be used to unmount and remount the lightbox.
However, now I'm facing the issue that with an introduced key prop, I need two clicks for the lightbox to open and I simply can't figure out what i'm missing.
The state of toggler and selectedCategory changes at the same time when clicking on each button.
When I'm not using the key prop, the lightbox opens on the first click, but later on crashes when the number of images to be displayed changes.
Any ideas what could be causing this? We're out of ideas since we think we're using this according to the provided documentation.
Thanks!
The text was updated successfully, but these errors were encountered:
How do you invoke setToggler?
In my case with setToggler(!toggler) as shown in the document, Same issue happened.
We need to make sure to invert current state correctly by using first argument of the set function like setToggler(prev => !prev).
I'm currently facing the issue that I have 8 buttons that open one and the same lightbox component with varying props.
The documentary states that props are not reactive and that the key prop should be used to unmount and remount the lightbox.
However, now I'm facing the issue that with an introduced key prop, I need two clicks for the lightbox to open and I simply can't figure out what i'm missing.
The state of toggler and selectedCategory changes at the same time when clicking on each button.
When I'm not using the key prop, the lightbox opens on the first click, but later on crashes when the number of images to be displayed changes.
Any ideas what could be causing this? We're out of ideas since we think we're using this according to the provided documentation.
Thanks!
The text was updated successfully, but these errors were encountered: