Skip to content

Commit

Permalink
Merge pull request #45335 from margelo/fix/unexpected-unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny authored Jul 15, 2024
2 parents 75e3e2f + 5492f90 commit 8198564
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/freezeScreenWithLazyLoading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import memoize from 'lodash/memoize';
import React from 'react';
import FreezeWrapper from './Navigation/FreezeWrapper';

Expand All @@ -13,8 +14,8 @@ function FrozenScreen<TProps extends React.JSX.IntrinsicAttributes>(WrappedCompo
}

export default function freezeScreenWithLazyLoading(lazyComponent: () => React.ComponentType) {
return () => {
return memoize(() => {
const Component = lazyComponent();
return FrozenScreen(Component);
};
});
}

0 comments on commit 8198564

Please sign in to comment.