Skip to content

Commit 975b7ea

Browse files
committed
Memoize default cluster view component
1 parent 9256050 commit 975b7ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/maps/src/components/marker-cluster/MapMarkerClusterView.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const MapMarkerClusterView: React.FC<MapMarkerClusterViewProps> = ({
2727
);
2828
};
2929

30-
export const DefaultMapMarkerClusterView = withTheme(
31-
({ theme }: { theme: typeof DefaultTheme }) => {
30+
export const DefaultMapMarkerClusterView = React.memo(
31+
withTheme(({ theme }: { theme: typeof DefaultTheme }) => {
3232
return (
3333
<MapMarkerClusterView
3434
renderItem={({ markerCount }) => (
@@ -58,7 +58,7 @@ export const DefaultMapMarkerClusterView = withTheme(
5858
)}
5959
/>
6060
);
61-
}
61+
})
6262
);
6363

6464
export default MapMarkerClusterView;

0 commit comments

Comments
 (0)