Skip to content

Commit

Permalink
Memoize default cluster view component
Browse files Browse the repository at this point in the history
  • Loading branch information
YoussefHenna committed Oct 17, 2023
1 parent 9256050 commit 975b7ea
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const MapMarkerClusterView: React.FC<MapMarkerClusterViewProps> = ({
);
};

export const DefaultMapMarkerClusterView = withTheme(
({ theme }: { theme: typeof DefaultTheme }) => {
export const DefaultMapMarkerClusterView = React.memo(
withTheme(({ theme }: { theme: typeof DefaultTheme }) => {
return (
<MapMarkerClusterView
renderItem={({ markerCount }) => (
Expand Down Expand Up @@ -58,7 +58,7 @@ export const DefaultMapMarkerClusterView = withTheme(
)}
/>
);
}
})
);

export default MapMarkerClusterView;

0 comments on commit 975b7ea

Please sign in to comment.