Skip to content

How can we modify the quantity of slides without re-rendering the carousel? #334

Answered by RyanPaiva56
RyanPaiva56 asked this question in Q&A
Discussion options

You must be logged in to vote

Actually, after digging deeper it turns out the issue is how the sliding animation works to begin with. Basically the way it works is pure-react-carousel makes the parent 100% * number of slides. So when you add more slides, it makes it bigger, then the transform animation takes effect. With this manner of handling the sliding, there is no way to handle adding more slides without running into animation triggers. Unfortunately I think this means anyone looking to dynamically add slides needs to use a different package.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Conor-Hinchee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant