Skip to content
Version: XState v5

XState examples

XState v5 examples are also available in the /examples directory. Many of the examples have a CodeSandbox link where you can run the example in your browser.

Simple fetch example

A simple fetch example built with:

7GUIs counter (React)

An implementation of the 7GUIs counter built with:

7GUIs temperature (React)

This is an implementation of the 7GUIs temperature converter built with:

Simple list (React)

A React list built with:

Stopwatch

A simple stopwatch built with:

Tic-tac-toe game (React)

An implementation of tic-tac-toe built with:

Tiles game (React)

A simple tiles game built with:

TodoMVC (React)

An implementation of TodoMVC built with:

Toggle

A simple toggle built with:

Hello world workflow

Serverless hello world workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Hello world workflow on GitHub

Greeting workflow

Serverless greeting workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Greeting workflow on GitHub

Event-based greeting workflow

Serverless event-based greeting workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Event-based greeting workflow on GitHub

Solving math problems

Serverless math solving problem workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Solving math problems on GitHub

Parallel execution workflow

Serverless parallel execution workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Parallel execution workflow on GitHub

Async function invocation workflow

Serverless async function invocation workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Async function invocation workflow on GitHub

Async subflow invocation workflow

Serverless async subflow invocation workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Async subflow invocation workflow on GitHub

Event-based transitions (event-based switch) workflow

Serverless event-based transitions workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Event-based transitions workflow on GitHub

Applicant request decision workflow

Serverless applicant request decision workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Applicant request decision workflow on GitHub

Provision orders (error handling) workflow

Serverless provision orders (error handling) workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Provision orders (error handling) workflow on GitHub

Monitor job for completion (polling) workflow

Serverless monitor job for completion (polling) workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Monitor job for completion (polling) workflow on GitHub

Send CloudEvent on workflow completion

Serverless send CloudEvent on workflow completion workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Send CloudEvent on workflow completion on GitHub

Monitor patient vital signs workflow

Serverless monitor patient vital signs workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Monitor patient vital signs workflow on GitHub

Finalize college application workflow

Serverless finalize college application workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Finalize college application workflow on GitHub

Perform customer credit check workflow

Serverless perform customer credit check workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Perform customer credit check workflow on GitHub

Handle car auction bids (scheduled start) workflow

Serverless handle car auction bids (scheduled start) workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Handle car auction bids (scheduled start) workflow on GitHub

Check inbox periodically (cron-based workflow start)

Serverless check inbox periodically (cron-based workflow start) from the CNCF Serverless Workflow examples built with:

  • XState v5

Check inbox periodically (cron-based workflow start) on GitHub

Event-based service workflow

Serverless event-based service workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Event-based service workflow on GitHub

Reusing function and event definitions workflow

Serverless reusing function and event definitions workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Reusing function and event definitions workflow on GitHub

New patient onboarding (error checking and retries) workflow

Serverless new patient onboarding (error checking and retries) workflow from the CNCF Serverless Workflow examples.

New patient onboarding (error checking and retries) workflow on GitHub

Purchase order deadline (ExecTimeout) workflow

Serverless purchase order deadline (ExecTimeout) workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Purchase order deadline (ExecTimeout) workflow on GitHub

Accumulate room readings and create timely reports (ExecTimeout and KeepActive) workflow

Serverless accumulate room readings and create timely reports (ExecTimeout and KeepActive) workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Accumulate room readings and create timely reports (ExecTimeout and KeepActive) workflow on GitHub

Car vitals checks (SubFlow Repeat) workflow

Store a single bid when the car auction is active.

Serverless car vitals checks (SubFlow Repeat) workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Car vitals checks (SubFlow Repeat) workflow on GitHub

Book lending workflow

Serverless book lending workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Book lending workflow on GitHub

Filling a glass of water workflow

Serverless filling a glass of water workflow from the CNCF Serverless Workflow examples built with:

  • XState v5

Filling a glass of water workflow on GitHub

More examples coming soon

If you have any examples you want us to make, please add a request to our feedback board or upvote an existing suggestion.

If you have an example you want to share, contribute your example to the XState repository.