-
Notifications
You must be signed in to change notification settings - Fork 80
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
Bug in React Experimental Build #106
Comments
Hey, thanks for pointing this out. I'm planning to port this to hooks so this should not be an issue. |
It seems to me like a similar issue also is present on the stable react v16.12.0. I forked the Now that error is gone, while the component still seems to be functional and deals with updated values correctly. Probably won't matter when the logic is reimplemented in hooks, but in the meantime maybe someone has to deal with the same issue and reads this. |
Problem or feature description:
In some cases
onChange
callback is fired during rendering (especially with new react' concurrent mode)Steps to reproduce (for problems):
Versions (for problems):
React-Compound-Slider: 2.4.0
React: experimental
Performing side-effects inside
getDerivedStateFromProps
is antipattern (due to official react docs)So, this lines of code blowing react is some cases. Because these callbacks occasionally can be fired during parent' render stage.
The text was updated successfully, but these errors were encountered: