DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Mariusz
Mariusz

Posted on • Updated on

React tldr; Optimize Components with React.memo, useMemo, and useCallback

  • With React.Memo, if a component returns the same result given the same props, wrapping it in memo can result in a performance boost.

  • useMemo allows you to memoize the results of a function and will return that result until an array of dependencies change.

  • useCallback can prevent unnecessary renders between parent and child components.

Source: https://headway.io/blog/react-optimize-components-memo-usememo-usecallback/

Top comments (0)

50 CLI Tools You Can't Live Without

>> Check out this classic DEV post <<