Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to use react memo hooks

function moviePropsAreEqual(prevMovie, nextMovie) {
  return prevMovie.title === nextMovie.title
    && prevMovie.releaseDate === nextMovie.releaseDate;
}

const MemoizedMovie2 = React.memo(Movie, moviePropsAreEqual);
Source by dmitripavlutin.com #
 
PREVIOUS NEXT
Tagged: #react #memo #hooks
ADD COMMENT
Topic
Name
7+3 =