Lazy loading areas

Hello everyone, since I have very large data, I wrote the code below to show only the marks where the camera points. However, momentary freezes occur. How can I follow the solution?

export const getBoundingBox = (viewer: Viewer) => {
  const rectangle = viewer.camera.computeViewRectangle();
  if (rectangle) {
    return {
      west: CesiumMath.toDegrees(rectangle.west),
      south: CesiumMath.toDegrees(rectangle.south),
      east: CesiumMath.toDegrees(rectangle.east),
      north: CesiumMath.toDegrees(rectangle.north),
    };
  }
  return null;
};

 cesiumViewer.current?.camera.moveEnd.addEventListener(() => {
    const initialBbox = getBoundingBox(cesiumViewer.current!);

    setBbox(initialBbox);

    const updatedBbox = getBoundingBox(cesiumViewer.current!);
    setBbox(updatedBbox);
  });

Hi @selim_sezer,

I think we need more information to determine the issue. Would you mind putting together a sandcastle example which replicates the issue?

Sample Code is like this, but I’m using React and it’s constantly making requests. Since there’s a lot of data, the map needs to be loaded according to the user’s movements.