Generated by XState Viz: https://xstate.js.org/viz
✓ Published0🌍 Public
TToastbroad
Last edited Apr 20, 2022
Created on Apr 14, 2022
This example uses XState to model a recommendation flow based on employment status and insurance coverage. A `Machine` defines states for employed and unemployed users, each with nested sub-states for insurance checks. The `context` stores initial data (`employmentStatus` and `insurances`), while guard functions like `isEmployed`, `isUnemployed`, `isFullyInsured`, and `isUninsured` evaluate conditions on `NEXT` events to transition between states. The visualization, generated by XState Viz, renders the statechart with transitions and final states.
AI-generated description