- It is the responsibility of this function to return true if the component should update and false if the component should not update.
- Using tools will help you find performance hotspots specific to your application.
- Anything else you can think of that avoids creating a new function every time render is called!
- Every component in React has a shouldComponentUpdate(nextProps, nextState) function.
- Generally applications want to promote loose coupling (components know as little about other components as possible).
The main performance hotspot in React applications is redundant processing and DOM diffing in components. In order to avoid this return false from shouldComponentUpdate as high up in your application…
Continue reading “Performance optimisations for React applications – Alex Reardon – Medium”