FRONT013warningPro

step-state-no-history

Multi-step flow uses useState without browser history — back button exits the app

Applies to: JavaScript, TypeScript

Why this matters

When a multi-step flow (booking wizard, onboarding, form wizard) tracks its current step in a plain useState, the browser has no idea the user navigated between steps. Clicking the back button doesn't go to the previous step — it leaves the app entirely. Sync step state with the URL via useSearchParams, router.push, or window.history.pushState so back/forward navigation works.

Catch it before it ships

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

FRONT013 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: FRONT013