![Page 1: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/1.jpg)
REACT PERFORMANCE
HOW TO SPEED YOUR APP UP
![Page 2: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/2.jpg)
My name is Kateryna Porshnieva
live in Kiev, Ukraine
work as Front-End Developer & UI/UX designer at YouScan
teach React & Redux course in Ukraine
@krambertech
![Page 3: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/3.jpg)
PART 1:
WHAT MAKES APPS FEEL `FAST`
![Page 4: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/4.jpg)
‣Fast load speed
‣Fast user interactions
‣Smooth animations
![Page 5: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/5.jpg)
PART 2:
FIRST LOAD SPEED
![Page 6: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/6.jpg)
BUNDLE SIZE
![Page 7: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/7.jpg)
1. SET NODE_ENV TO `PRODUCTION`
![Page 8: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/8.jpg)
![Page 9: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/9.jpg)
2. TRANSFORM REACT CONSTANT ELEMENTS
![Page 10: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/10.jpg)
![Page 11: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/11.jpg)
![Page 12: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/12.jpg)
3. INLINE REACT ELEMENTS
![Page 13: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/13.jpg)
![Page 14: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/14.jpg)
4. REMOVE PROPTYPES
![Page 15: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/15.jpg)
![Page 16: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/16.jpg)
5. TRANSFORM PURE CLASS TO FUNCTION
![Page 17: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/17.jpg)
![Page 18: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/18.jpg)
![Page 19: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/19.jpg)
REACT-OPTIMIZE ❤
![Page 20: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/20.jpg)
![Page 21: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/21.jpg)
6. REMOVE UNUSED LOCALES FROM MOMENT.JS
![Page 22: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/22.jpg)
![Page 23: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/23.jpg)
![Page 24: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/24.jpg)
1.98 MB -> 1.24 MB
![Page 25: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/25.jpg)
PART 3:
PERFORMANT UPDATES
![Page 26: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/26.jpg)
- Everyone
“React is fast”
![Page 27: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/27.jpg)
![Page 28: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/28.jpg)
![Page 29: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/29.jpg)
![Page 30: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/30.jpg)
![Page 31: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/31.jpg)
VIRTUAL DOM
![Page 32: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/32.jpg)
![Page 33: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/33.jpg)
![Page 34: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/34.jpg)
![Page 35: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/35.jpg)
![Page 36: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/36.jpg)
![Page 37: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/37.jpg)
![Page 38: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/38.jpg)
![Page 39: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/39.jpg)
![Page 40: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/40.jpg)
![Page 41: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/41.jpg)
React re-renders the whole app on any state (data) change
![Page 42: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/42.jpg)
PART 4:
MEASURING PERFORMANCE
![Page 43: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/43.jpg)
CONSOLE.TIME
![Page 44: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/44.jpg)
![Page 45: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/45.jpg)
CHROME DEVTOOLS ELEMENTS PANE
![Page 46: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/46.jpg)
![Page 47: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/47.jpg)
REACT 15.4 +
CHROME DEVTOOLS TIMELINE
![Page 48: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/48.jpg)
![Page 49: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/49.jpg)
REACT-ADDONS-PERF
![Page 50: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/50.jpg)
![Page 51: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/51.jpg)
FPS-METER
![Page 52: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/52.jpg)
![Page 53: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/53.jpg)
REACT DEVTOOLS +
TRACE REACT UPDATES
![Page 54: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/54.jpg)
![Page 55: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/55.jpg)
PART 5:
OPTIMIZING PERFORMANCE
![Page 56: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/56.jpg)
SHOULDCOMPONENTUPDATE
![Page 57: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/57.jpg)
![Page 58: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/58.jpg)
![Page 59: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/59.jpg)
PURE COMPONENTS
![Page 60: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/60.jpg)
![Page 61: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/61.jpg)
![Page 62: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/62.jpg)
![Page 63: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/63.jpg)
![Page 64: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/64.jpg)
react v15.3 and higher
![Page 65: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/65.jpg)
OPTIMIZING FOR PURE COMPONENTS
![Page 66: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/66.jpg)
1. FUNCTION.BIND / ARROW FUNCTIONS
![Page 67: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/67.jpg)
![Page 68: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/68.jpg)
![Page 69: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/69.jpg)
![Page 70: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/70.jpg)
![Page 71: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/71.jpg)
![Page 72: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/72.jpg)
![Page 73: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/73.jpg)
2. ARRAYS / OBJECTS CREATION
![Page 74: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/74.jpg)
![Page 75: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/75.jpg)
![Page 76: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/76.jpg)
![Page 77: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/77.jpg)
![Page 78: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/78.jpg)
![Page 79: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/79.jpg)
![Page 80: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/80.jpg)
3. MODIFICATION BY REFERENCE
![Page 81: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/81.jpg)
![Page 82: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/82.jpg)
![Page 83: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/83.jpg)
![Page 84: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/84.jpg)
![Page 85: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/85.jpg)
IMMUTABLE.JS
![Page 86: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/86.jpg)
PART 7:
REDUX PERFORMANCE
![Page 87: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/87.jpg)
CONNECT COMPONENTS TO STATE AT LOWER LEVEL
![Page 88: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/88.jpg)
![Page 89: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/89.jpg)
![Page 90: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/90.jpg)
![Page 91: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/91.jpg)
![Page 92: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/92.jpg)
![Page 93: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/93.jpg)
MEMOIZATION
![Page 94: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/94.jpg)
![Page 95: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/95.jpg)
![Page 96: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/96.jpg)
![Page 97: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/97.jpg)
![Page 98: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/98.jpg)
PART 8:
PRETEND WORKING FAST
![Page 99: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/99.jpg)
SPINNERS / PROGRESS BARS
![Page 100: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/100.jpg)
![Page 101: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/101.jpg)
<1s 1-4s >4s
Nothing Spinner Progress bar
![Page 102: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/102.jpg)
OPTIMISTIC UPDATES
![Page 103: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/103.jpg)
Image credit: https://uxplanet.org/optimistic-1000-34d9eefe4c05
![Page 104: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/104.jpg)
Image credit: https://uxplanet.org/optimistic-1000-34d9eefe4c05
![Page 105: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/105.jpg)
Image credit: https://uxplanet.org/optimistic-1000-34d9eefe4c05
![Page 106: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/106.jpg)
VIRTUAL SCROLLING
![Page 107: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/107.jpg)
Image credit: https://medium.com/outsystems-engineering/virtualizing-the-virtual-dom-pushing-react-further-d76a16e5f209
![Page 108: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/108.jpg)
Image credit: https://bvaughn.github.io/connect-tech-2016/#/8/4
![Page 109: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/109.jpg)
![Page 110: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/110.jpg)
CACHING
![Page 111: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/111.jpg)
PART 9:
WHEN TO OPTIMIZE
![Page 112: Ways to measure & boost performance of your React app](https://reader035.vdocuments.net/reader035/viewer/2022070603/587310291a28ab99088b7a2d/html5/thumbnails/112.jpg)
FIN.