When a component's output is not affected by a change in state or props, you can optimize its rendering with ______.

  • Pure Components
  • React.memo()
  • useCallback()
  • PureComponent()
When a component's output is not affected by a change in state or props, you can optimize its rendering with React.memo(). This higher-order component (HOC) prevents unnecessary re-renders of a component when its input props remain the same. The other options are related to optimization but not specifically for cases where props or state don't change.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *