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();
  }
);

screen shot 2016-05-23 at 9 21 08 am

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

Most upvoted comments

Thanks, this makes sense. For the context, I forgot about the portal use case where people ReactDOM.render again 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.