EPAM Systems Interview Question

How we can prevent unnecessary re-renders in a React component?