Skip to content

Commit 7d8d621

Browse files
committed
Removed map marker memoization
1 parent 570943c commit 7d8d621

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/components/HuntingMap/HuntingMap.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type {
66
} from 'react';
77
import {
88
createRef,
9-
memo,
109
useCallback,
1110
useEffect,
1211
useMemo,
@@ -61,9 +60,6 @@ import type {
6160
import type { HuntingMapDragOptions, HuntingMapProps } from './types';
6261
import styles from './HuntingMap.module.css';
6362

64-
const HuntingMapAnimalMemo = memo(HuntingMapAnimal);
65-
const HuntingMapMarkerMemo = memo(HuntingMapMarker);
66-
6763
export const HuntingMap = (props: HuntingMapProps) => {
6864
const {
6965
animalMarkers,
@@ -741,7 +737,7 @@ export const HuntingMap = (props: HuntingMapProps) => {
741737
animalMarkerRefs.current.push({ marker, ref });
742738

743739
return (
744-
<HuntingMapAnimalMemo
740+
<HuntingMapAnimal
745741
key={marker.id}
746742
marker={marker}
747743
markerSize={markerSizeAnimal}
@@ -779,7 +775,7 @@ export const HuntingMap = (props: HuntingMapProps) => {
779775
genericMarkerRefs.current.push({ marker, ref });
780776

781777
return (
782-
<HuntingMapMarkerMemo
778+
<HuntingMapMarker
783779
className={getGenericMarkerColorClass(
784780
marker,
785781
styles.HuntingMapMarkerGeneric,

0 commit comments

Comments
 (0)