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
{{ message }}
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
It looks to me as if shouldComponentUpdate checks counts as an update in the devtools.
Even if a component return false on sCU it will flash as updated. Child components of a falsy sCU won't flash, suggesting that sCU is probably not tracing renders per-se but the componentWillReceiveProps part of the lifecycle.
With "Trace React Updates" flipped on I'd expect the first input to flash itself and its parent when you change the value. The second input guard itself with a sCU for its local state.
But it flashes, suggesting the sCU returned true when it actually returned false.
If the second input is changed, it'll only update its local state and the devtools will show a trace for just the second input, just as you'd expect.
If this is the intended behavior, then it should be much more clear so that lesser experienced devs isn't mislead into thinking pure components are rendering when they aren't.
tommoor, alexdunae, switz, emecell, jampy and 6 more