// Real world
r13
Multi-step form
Wizard, checkout, onboarding. Forward and back navigation, with the submit button only legal on the last step.
Code
const wizard = sm`
account 'next' → profile;
profile 'next' → review;
review 'submit' → done;
profile 'back' → account;
review 'back' → profile;
`;
// 'submit' is only legal on 'review' — the button literally cannot fire elsewhere
Notes
The disabled-state for the submit button comes for free: wizard.valid_action('submit') tells you whether to grey it out, and you wired no logic to make that work.