Fix key prop in PointsCreator component: add unique key for nested point mapping to improve rendering performance.

This commit is contained in:
2025-05-03 10:48:39 +05:30
parent 4fc014cd28
commit 52c6017649

View File

@@ -122,7 +122,7 @@ function PointsCreator() {
key={i}
position={new THREE.Vector3(...event.position)}
>
{event.points.map((point) => (
{event.points.map((point, j) => (
<mesh
name="Event-Sphere"
uuid={point.uuid}
@@ -133,6 +133,7 @@ function PointsCreator() {
sphereRefs.current[point.uuid]
);
}}
key={`${i}-${j}`}
position={new THREE.Vector3(...point.position)}
userData={{
modelUuid: event.modelUuid,