React Performance Tips

React.memo


React.memo is a higher order component that will only re-render if the props have changed. This is useful for components that are expensive to render.

const MyComponent = React.memo(({ name }) => {
 return <div>{name}</div>;
});