Closed jorgeart81 closed 3 months ago
Why does it update everything on the socket update?
El socket actualiza el estado del store. Por ejemplo en devices en el caso del CombinedReportPage.jsx
It seems to me that PageLayout should be the parent of reports, so it will not be affected.
You can check the PR https://github.com/traccar/traccar-web/pull/1252
Sounds like using useMemo
would be the right approach here.
Hello, I hope this PR is helpful to you.
Update the itemsCoordinates state every time the length of itemsRoutes changes.
Before -> the map was returning to its initial state when the state was updated with the socket
https://github.com/traccar/traccar-web/assets/92123185/2c3e0279-eb36-471f-8787-ea079ccfbde7
After
https://github.com/traccar/traccar-web/assets/92123185/9bc325df-fc87-4fee-8170-9286ccaf5102