diff --git a/src/libs/freezeScreenWithLazyLoading.tsx b/src/libs/freezeScreenWithLazyLoading.tsx index 177d7826306c..01da7d7fda58 100644 --- a/src/libs/freezeScreenWithLazyLoading.tsx +++ b/src/libs/freezeScreenWithLazyLoading.tsx @@ -1,3 +1,4 @@ +import memoize from 'lodash/memoize'; import React from 'react'; import FreezeWrapper from './Navigation/FreezeWrapper'; @@ -13,8 +14,8 @@ function FrozenScreen(WrappedCompo } export default function freezeScreenWithLazyLoading(lazyComponent: () => React.ComponentType) { - return () => { + return memoize(() => { const Component = lazyComponent(); return FrozenScreen(Component); - }; + }); }