question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What do `shouldSwiperUpdate` and `rebuildOnUpdate` properties do?

See original GitHub issue

The documentation is not clear about what does each of those properties do. https://react-id-swiper.ashernguyen.site/doc/api

I supposed those two properties are for dynamic children. When should one use shouldSwiperUpdate and when should one use rebuildOnUpdate?

I added shouldSwiperUpdate and seems that it works. What for is the rebuildOnUpdate then?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
catamphetaminecommented, Aug 26, 2019

You should learn about Swiper itself first 😃

Honestly, no one wants to learn anything about anything. You don’t have to explain what those properties mean but you should also know that this is not something that everyone just knows what it means. This issue can be closed: the purpose of it is so that other people searching “Issues” by those keywords would find this discussion and maybe then they could leave an explanation of what those properties mean. I can say that shouldSwiperUpdate makes the component update correctly if the slides have changed. That’s my use case.

0reactions
akshaybosamiyacommented, Apr 3, 2020

Thanks @catamphetamine. I spent yesterday 4-5 hours to figured it out. But I got the answer from your question what I wanted to do exactly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to reset react-id-swiper each time event handler is called ...
I found the solution by adding rebuildOnUpdate: true prop to the params passing to the Swiper. A complete list of props can be...
Read more >
React swiper test - CodePen
... there that can affect the whole document, this is the place to do it. ... rebuildOnUpdate: PropTypes.bool,\\n shouldSwiperUpdate: PropTypes.bool,\\n ...
Read more >
swiper slidesperview not working - amiraartdecor.it
Mar 12, 2022 · Solution I think your swiper does not initialize on your ... setting rebuildOnUpdate and shouldSwiperUpdate but this did not...
Read more >
swiper slidesperview not working - T I L D A loves
Hooks can only be called iI have a slider that I want to set to autoplay ... As you can see I also...
Read more >
The react-id-swiper from kidjp85 - GithubHelp
rebuildOnUpdate, Boolean, false, Rebuild swiper when component is updated ... We are trying to do our own swiper react component and it's working...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found