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
For a component with shouldComponentUpdate (for example, a PureComponent), calling setState with a new state value does not cause it to re-render, if the parent component is updated at the same time.
Reproduced with Preact 10.11.3.
Describe the bug
For a component with
shouldComponentUpdate
(for example, aPureComponent
), callingsetState
with a new state value does not cause it to re-render, if the parent component is updated at the same time.To Reproduce
https://codepen.io/kmxz/pen/bGjzvbR
Expected behavior
In the example above, the new
state.text
value "Child-NEW" should be rendered, instead of the stalestate.text
value "child-old".Rendering the exact same demo code using React gives the correct behavior (https://codepen.io/kmxz/pen/rNrPJEq).
The text was updated successfully, but these errors were encountered: