chore: memoize components (#607)

This commit is contained in:
Jeremy 2024-12-10 17:54:10 +05:30 committed by GitHub
parent 906d7d34da
commit 3df0fd4c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 123 additions and 53 deletions

View file

@ -469,5 +469,8 @@ const PureToolbar = ({
};
export const Toolbar = memo(PureToolbar, (prevProps, nextProps) => {
return equal(prevProps, nextProps);
if (prevProps.isLoading !== nextProps.isLoading) return false;
if (prevProps.isToolbarVisible !== nextProps.isToolbarVisible) return false;
return true;
});