react: React devtools 15.1.0 ctor timer error
bug
Warning displayed in console about internal error of React performance measurement code.
import React from 'react';
import { render } from 'react-dom';
import Perf from 'react-addons-perf';
import { browserHistory, Router } from 'react-router';
import routes from './routes';
import persist from 'altFlux/persist';
persist('docs');
const target = document.getElementById('app');
Perf.start();
render(
<Router
routes={routes}
history={browserHistory}
/>,
target,
() => {
Perf.stop();
Perf.printWasted();
}
);

15.1.0 Google Chrome
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- 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 match... — committed to facebook/react by gaearon 8 years ago
- 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 ... — committed to zpao/react by gaearon 8 years ago
- 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 ... — committed to facebook/react by gaearon 8 years ago
Thanks, this makes sense. For the context, I forgot about the portal use case where people
ReactDOM.renderagain right inside a lifecycle method, thus making timers stack. We should probably keep the warning but push any timers running when a flush starts onto the stack, and pop them when the flush ends.