-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bad strategies setState #724
base: master
Are you sure you want to change the base?
Conversation
|
@@ -66,7 +66,9 @@ const Carousel = (props) => { | |||
carouselRef, | |||
); | |||
|
|||
setStrategies(strategies); | |||
useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋
First things first, thank you for the work you're doing on this! 🙏
I was having the problem that this PR is aiming to fix, so I made a fork to have it available until you guys can merge and release this.
I can confirm that this change works well! 👏 We did see a new warning on the tail of it though. We had an instance of the "Can't perform a React state update on an unmounted component..." error popup on us when we moved between cards in the carousel.
On our fork, we fixed this by checking that the component is still mounted before running setStrategies
. You can see our implementation at @vaam-io/react-carousel.
Keep up the good work! 🚀
EDIT: It turns out our fix didn't solve the problem at all. 🤦 We'll keep trying :)
@RobertHebel @Lukasz-pluszczewski any updates to merge this in to fix the issues? or does this PR have issues as well? |
Deployed to https://beghp.github.io/gh-pages-rc-5
- [x] an issue linked to the PR
It fixes: #710, #714 #707