use memo object code example
Example 1: 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);
Example 2: how to add react.memo in export list
export const MemoMainPostTopic = React.memo(MainPostTopic);
//or
const MainPostTopic = memo(() => {
...
})
export { MainPostTopic };