A Beginner's Guide to Performance Optimization Using React.memo()

Written by Kiran | Published 2020/12/10
Tech Story Tags: react | reactjs | javascript | coding | programming | react-native | components | software-development | web-monetization

TLDR React.memo is a higher-order component provided by React that will return a memoized version of the component that only changes if one of the props has changed. This helps to prevent unnecessary re-rendering of components and computations needed for component rendering. The method will memoize the component and does a shallow comparison of the rendered output then skips unnecessary rendering. This will prevent the recomputation during the render and the UI updates quickly. The parent component will import all these components and have a method to update the greetings count.via the TL;DR App

no story

Written by Kiran | Content Writer at Truemark Technology. Company Website Link - https://www.truemark.dev/
Published by HackerNoon on 2020/12/10