Attach ReactPerf to window for easier debugging (#3318)

rebase/4.0.0rc2
Nolan Lawson 2017-05-25 12:14:40 -07:00 committed by Eugen Rochko
parent b89ab7e69d
commit a6ba004bf5
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ if (process.env.NODE_ENV === 'development') {
performance.setResourceTimingBufferSize(Infinity); performance.setResourceTimingBufferSize(Infinity);
} }
marky = require('marky'); marky = require('marky');
require('react-addons-perf').start(); // allows us to easily do e.g. ReactPerf.printWasted() while debugging
window.ReactPerf = require('react-addons-perf');
window.ReactPerf.start();
} }
export function start(name) { export function start(name) {