Virtualized slides midway freeze during swipe #4661
Unanswered
ajaypillay
asked this question in
Q&A
Replies: 3 comments 1 reply
-
Were you able to resolve this? Would be great if you could post your solution here for everyone else. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
-
any update? |
Beta Was this translation helpful? Give feedback.
0 replies
-
you're right. it will fix the issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, so I have some rather complex components being rendered in a virtualized swiper in React.
The issue is that as I swipe, there is a momentary freeze, because the virtualized swiper is updating a new slide to render
onSlideChange
.Is there any way to force the virtualized swiper to render a new slide
onSlideTransitionEnd
instead? Because then due to the state update being done after the animation completes, there won't be a freeze.It's a little hard to reproduce the code in a sandbox due to the complexity of the components.
EDIT: I have recordings of it happening here:
Without virtualization (only 5 slides here so it's smooth, it actually contains more but it's too slow and choppy if I render more without virtualization):
https://user-images.githubusercontent.com/917752/121326767-6e933680-c945-11eb-898d-2bc7390100cd.mp4
With virtualization:
t_video6197218284312462109.mp4
You can see that there is a momentary freeze whenever I swipe to a new slide. I have tried increasing the rendered slide window by increasing
addSlidesAfter
andaddSlidesBefore
but that just made it even more choppy.My best guess is that the virtualization is causing the slide to be rendered
onSlideChange
instead ofonSlideTransitionEnd
, that's why there's the momentary freeze.Is there any way for me to change/fix this?
Beta Was this translation helpful? Give feedback.
All reactions