No animation in navigation using dispatch({increment: number, duration: number}) #81
-
Hi folks, I am trying to create a custom navigation component with one button to navigate to the previous slide, and another to navigate to the next. I am using the dispatch function provided by the useLightboxState hook. I have tried setting the value of duration to different values but to no avail. It just quickly snaps to the next image without any animation. Am I missing something here? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
v3 UPDATE v3 now provides dedicated
It is expected behavior. Modifying the lightbox state in such a way skips the first step in FLIP animation. Please use const { publish } = useEvents();
publish(ACTION_NEXT); |
Beta Was this translation helpful? Give feedback.
v3 UPDATE
v3 now provides dedicated
prev
/next
methods to navigate to the previous / next slide. These methods can be accessed in one of the following ways:useController
hookIt is expected behavior. Modifying the lightbox state in such a way skips the first step in FLIP animation.
Please use
ACTION_PREV
/ACTION_NEXT
events to navigate to the previous/next slide.