Canadian-Geospatial-Platform / geoview

Canadian Geospatial Platform Viewer / Visualiseur de la Plateforme Géospatiale Canadienne
Other
22 stars 31 forks source link

[BUG] Legend component re-renders too many times #2214

Closed cphelefu closed 3 days ago

cphelefu commented 1 month ago

Is there an existing issue for this?

Current Behavior

In the legend.tsx file add a console log and refresh the page. You will notice that we have more than 15 console logs printed (I think this depends on count of layers..maybe).

This means the component re-renders that many times on initial load.

Expected Behavior

The component should not re-render too many times.

Steps To Reproduce

No response

Anything else?

No response