Skip to content

Examples

Each demo is one app with a version for each adapter. Select useReducer or XState above it to change the version. The panel then lists the machine of that version.

The Code tab of each demo shows its component, its machine and its fixtures, each in a file. The demos give the fixtures to <Kotick /> as an array, so the fixtures are in each build of this site. In your app, use a loader with a development condition. Refer to Define fixtures.

Checkout

A checkout page. The reducer machine has one state for each step of the page. The XState machine has parallel regions for the cart, the shipping and the payment. The payment sends a request that can fail.

Checkout

Check the cart, then select the shipping.

  • Linen tote
    2
    $48.00
  • Canvas pouch
    1
    $12.00
Shipping

Click the bubble, or press Alt+S.

Onboarding

An onboarding flow in four steps. Each step is a state of the onboarding machine. Step 3 sends a request that can fail. The reducer machine has a state of its own for each state of the request, and the XState machine keeps them under workspace.

Create your profile

This is how your teammates see you.

Click the bubble, or press Alt+S.