Pure components are similar to functional components but are optimized for performance. They automatically do a shallow comparison of props and state and re-render only if there are differences. They can be created using the React.PureComponent
class or by using the React.memo()
higher-order component with functional components.