dillon1000/react
Commit
Browse files Don't count the time inside flushes towards lifecycle hooks (#6860)
* Don't count the time inside flushes towards lifecycle hooks Fixes #6842. We keep the existing behavior of testing for matching `onBeginLifeCycleTimer`/`onEndLifeCycleTimer` calls, but we push the current timer onto the stack if we enter a flush. This solves an issue with portals which cause updates while a lifecycle timer is already running. I chose to subtract the time spent in the flush from the time counted towards the lifecycle method because it would artificially inflate the “total” time of the component due to all the components inside the portal, so it would skew the exclusive table. * Fix up the comment
Changed paths2 files
First-parent comparisonsrc/renderers/shared/ReactDebugTool.js ModifiedM src/renderers/shared/__tests__/ReactPerf-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…