AuthorJaid Shaikh

useMemo vs React.memo: Which is better?


What is React.Memo? React.Memo is a HOC (Higher Order Component) in react js which accepts a react component & a function that updates the component with the help of props using memoization. React.Memo keeps the track of the react component between the renders. A small example to make you understand React.Memo concept, What is useMemo? useMemo is the hook in react js that accepts a function...

Render optimization in React app: Memoization using useMemo


What is the useMemo hook? The useMemo hook is one of the additional hooks that are implemented in React. The purpose of the useMemo hook is to memoize the return value of a function i.e it executes some function & remembers the value of that function. Syntax: – const memoVal= useMemo(funcThatReturnsValue,arrayDependencies) useMemo hook accepts two arguments i.e., the first argument is...