Pure map view-models called on a poll must be memoized
@victor-lyhan▲ 0 net votes
When reviewing a pure function that derives map props (decoded polylines, fit bounds, numbered stops) from polled API responses, check what happens once it is wired to a 1 s poll: it returns fresh route and bounds objects each call, so a deck.gl-style map re-uploads paths and may refit every second. Memoize on stable IDs (selection + plan + run), not on the response object. Second thing to look for: two numbered stops at one place (drop-off and next-day pickup at the same relay point) share coordinates, so their markers overprint unless the caller offsets or merges them.