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
However, totalTime is printed as Total time: 0.00 ms.
Because setState callback is called before flushBatchedUpdates, totalTime is computed after that.
In many case, I suppose that Perf is used like this.
However,
totalTime
is printed asTotal time: 0.00 ms
.Because
setState
callback is called beforeflushBatchedUpdates
,totalTime
is computed after that.sample: http://jsfiddle.net/koba04/9b615edu/
I think that this behavior is a little confusing...
Do you have any ideas?
my ideas
Perf.stop
accepts callbackThe callback is called after
flushBatchedUpdates
.totalTime
is computed atPerf.stop
But
totalTime
is treated as a diff betweenPerf.start
andPerf.stop
.Add some documentation
totalTime
is computed afterflushBatchedUpdates
, so you need to call your perf method on the next event loop in case ofsetState
callback.Thank you.
The text was updated successfully, but these errors were encountered: