why to create memos in reactjs 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 */
});