FRONT006infoPro

stale-time-dependent-ui

Time-dependent filtering without a re-render timer will show stale data.

Applies to: JavaScript, TypeScript

Why this matters

Functions like isPast(), isAfter(), and isBefore() evaluate against the current time at render. If the component never re-renders, the result becomes stale — for example, an event still appears as 'upcoming' after it has ended. Add a setInterval or useInterval hook to periodically re-evaluate time-dependent logic.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, FRONT006 includedstablestack explain FRONT006

FRONT006 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: FRONT006