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

This commit is contained in:
Jerald-Golden-B 2025-05-03 10:48:39 +05:30
parent 4fc014cd28
commit 52c6017649
1 changed files with 2 additions and 1 deletions

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,