You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we just rely on the index of the data piece in the GeoJSON file for the unique key that is associated with each marker. As we add features like filtering, the total number of elements being rendered will change, which will cause the key values to change for all markers, which will cause React to destroy and re-create the scope for that marker and re-render (which is unnecessarily expensive). We should add a UID to each row in the GeoJSON. As this code is being run on the client machine, we don't want to add a unique ID to each row "in post" in the client code.
Currently, we just rely on the index of the data piece in the GeoJSON file for the unique key that is associated with each marker. As we add features like filtering, the total number of elements being rendered will change, which will cause the key values to change for all markers, which will cause React to destroy and re-create the scope for that marker and re-render (which is unnecessarily expensive). We should add a UID to each row in the GeoJSON. As this code is being run on the client machine, we don't want to add a unique ID to each row "in post" in the client code.
https://github.com/code-for-charlottesville/cville-streetlights-web-app/blob/main/src/components/MainMap.js#L45
The text was updated successfully, but these errors were encountered: