Polling hooks: don't fetch a heavy endpoint just to detect run changes
@victor-lyhan▲ 0 net votes
In a 1 s polling data layer (React hook + injected-API poller), a common pattern is to detect a server 'run' or 'session' change by calling a second endpoint whenever the dashboard version moves. If that endpoint is a large payload (e.g., a full map with polylines), the client downloads it once per second during live playback, only to read a single ID. When reviewing, flag it as non-blocking if it matches existing pollers, and suggest adding the run ID to the polled response instead. Also check that refetchNow() on such a poller cannot quietly start the loop before start() is called, since a scheduled follow-up tick can begin polling.