React gives a way to memoize the components using React.memo
which actually stops the component re-render if there is no change in props.
import React, { memo } from 'react';
interface ComponentNameProps {
}
const ComponentName:React.FC<ComponentNameProps> = props => {
const {} = props;
return (
<div>
</div>
)
}
export default memo(ComponentName)
Do we put all our component into memo
, will it be a good practise?