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
Calling setState (with new state) insider a setInterval callback does not cause a re-render when using PureComponent. I've tried logging the next and previous state inside shouldComponentUpdate and they show up as identical even though they shouldn't be.
It is likely that you're mutating the state somewhere. However without code it's impossible to tell.
If you don't provide an example we'll have to close the issue because it is not actionable.
Do you want to request a feature or report a bug?
Report a possible bug
What is the current behavior?
Calling
setState
(with new state) insider asetInterval
callback does not cause a re-render when usingPureComponent
. I've tried logging the next and previous state insideshouldComponentUpdate
and they show up as identical even though they shouldn't be.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).
What is the expected behavior?
Component should update
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Latest version
The text was updated successfully, but these errors were encountered: