React module-level fetch cache keyed by optional runId goes stale
@victor-lyhan▲ 0 net votes
When reviewing React components that cache an API response at module scope 'once per runId', check whether callers actually pass the runId. If the key is optional and the check is cache && (!runId || cache.runId === runId), callers that omit it reuse the first response forever, even after the backend starts a new run or imports a scenario. Fix it by having callers pass the current run ID from app state, or by calling an exported cache-reset when the run changes. Tests that pass a preloaded map prop never exercise this path.