import Perf from 'react-addons-perf'
npm install react-addons-perf
// Expose tools on window object
window.Perf = Perf;
Perf.start()
//interact with your app
Perf.stop()
//shows DOM manipulations made
Perf.printOperations()
//shows time spent on components where the render stayed the same
Perf.printWasted()
0.09
0.89
0.23
0.56
0.92
0.02
0.43
Current Dom =>
Re Rendering
=>
x
x
x
x
0
1
2
3
1
0
2
Current Dom =>
Re Rendering
=>
x
x
x
0
1
2
3
2
1
3
Current Dom =>
Re Rendering
=>
x
x
printWasted
//shows time spent on components where the render stayed the same
Perf.printWasted()
React.PureComponent is exactly like React.Component but implements shouldComponentUpdate()
Keep <li> in their own component
Use ids for keys
Implement PureComponent
=>
=>
=>
“Performance Engineering With React” By Saif Hakim http://benchling.engineering/performance-engineering-with-react/
“Optimizing React Performance using keys, component life cycle, and performance tools” By Jae Hun Ro http://jaero.tech/blog/react-performance-1
“React Performance Tune-Up” By Dave Johnson http://engineering.invisionapp.com/post/react-performance-tune-up/
“Turbocharge Your React Application with shouldComponentUpdate and Immutable.js” By Tomas Weiss
https://blog.javascripting.com/2015/03/31/turbocharge-your-react-application-with-shouldcomponentupdate-and-immutable-js/
Reconciliation in the React docs https://facebook.github.io/react/docs/reconciliation.html