react: ReactDefaultPerf.printWasted() doesn't work

Calling ReactDefaultPerf.printWasted() results in:

Uncaught TypeError: Cannot read property 'forEach' of undefined
writes.(anonymous function).forEach @ ReactDefaultPerfAnalysis.js:195
Object.keys.forEach @ ReactDefaultPerfAnalysis.js:192
getUnchangedComponents @ ReactDefaultPerfAnalysis.js:191
getInclusiveSummary @ ReactDefaultPerfAnalysis.js:139
ReactDefaultPerf.getMeasurementsSummaryMap @ ReactDefaultPerf.js:118
ReactDefaultPerf.printWasted @ ReactDefaultPerf.js:133

(this is on a page internally at Facebook so I assume it’s a fairly recent React version)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

Yes. ReactPerf.start(), ReactPerf.stop() and the rest of the Perf API works, for example ReactPerf.printExclusive(), but not ReactPerf.printWasted().

I changed over to my 0.14.7 branch, and there everything works like it should, and I double checked that both ReactPerf and React was on 15.0.1.

image

I can dig around a bit more if this isn’t anything known.