You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React 16.13 throws the error "Cannot update a component from inside the function body of a different component." when trying to setState() a value from onUpdate callback.
This causes a massive spam of the following error:
Warning: Cannot update a component from inside the function body of a different component.
The error is also mentioned in the 16.13 changelog.
This warning will help you find application bugs caused by unintentional state changes. In the rare case that you intentionally want to change the state of another component as a result of rendering, you can wrap the setState call into useEffect.
I pretty much have no idea how I should fix this. Any guidance would be appreciated, thanks!
Versions (for problems):
React-Compound-Slider: 2.5.0
React: 16.13
The text was updated successfully, but these errors were encountered:
Tarpsvo
changed the title
[Question][16.3] Cannot update a component from inside the function body of a different component.
[Question] Cannot update a component from inside the function body of a different component.
Feb 28, 2020
Problem or feature description:
React 16.13 throws the error "Cannot update a component from inside the function body of a different component." when trying to
setState()
a value fromonUpdate
callback.Steps to reproduce (for problems):
Snippet of code:
This causes a massive spam of the following error:
Warning: Cannot update a component from inside the function body of a different component.
The error is also mentioned in the 16.13 changelog.
I pretty much have no idea how I should fix this. Any guidance would be appreciated, thanks!
Versions (for problems):
React-Compound-Slider: 2.5.0
React: 16.13
The text was updated successfully, but these errors were encountered: