Performance measurement with ReactJS

suggest change

You can’t improve something you can’t measure. To improve the performance of React components, you should be able to measure it. React 15 provided add-on tools to measure performance. Import the react-addons-perf module (removed after React 15):

import Perf from 'react-addons-perf' // ES6
// var Perf = require('react-addons-perf') // ES5 with npm
// var Perf = React.addons.Perf; // ES5 with react-with-addons.js

You can use the following methods from the imported Perf module:

The most important one which you will need most of the time is Perf.printWasted() which gives you the tabular representation of your individual component’s wasted time

You can note the Wasted time column in the table and improve a component’s performance using the Tips and Tricks section

Refer the React Official Guide and excellent article by Benchling Engg. on React Performance

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents