can we use react memo in class component code example
Example: import React, { memo } from 'react';
const MyComponent = React.memo(function MyComponent(props) {
/* only rerenders if props change */
});
const MyComponent = React.memo(function MyComponent(props) {
/* only rerenders if props change */
});