XState examples
XState v5 beta 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:
-
XState v5 beta
-
Parcel
7GUIs counter (React)​
An implementation of the 7GUIs counter built with:
-
XState v5 beta
-
React
-
TypeScript
-
Vite
7GUIs temperature (React)​
This is an implementation of the 7GUIs temperature converter built with:
-
XState v5 beta
-
React
-
TypeScript
-
Vite
Simple list (React)​
A React list built with:
-
XState v5 beta
-
React
-
TypeScript
-
Vite
Stopwatch​
A simple stopwatch built with:
-
XState v5 beta
-
TypeScript
-
Vite
Tic-tac-toe game (React)​
An implementation of tic-tac-toe built with:
-
XState v5 beta
-
React
-
TypeScript
-
Vite
Tiles game (React)​
A simple tiles game built with:
-
XState v5 beta
-
React
-
TypeScript
-
Vite
TodoMVC (React)​
An implementation of TodoMVC built with:
-
XState v5 beta
-
React
-
TypeScript
-
Vite
Toggle​
A simple toggle built with:
-
XState v5 beta
-
TypeScript
-
Vite
Hello world workflow​
Serverless hello world workflow from the CNCF Serverless Workflow examples built with:
- XState v5 beta
Hello world workflow on GitHub
Greeting workflow​
Serverless greeting workflow from the CNCF Serverless Workflow examples built with:
- XState v5 beta
Event-based greeting workflow​
Serverless event-based greeting workflow from the CNCF Serverless Workflow examples built with:
- XState v5 beta
Event-based greeting workflow on GitHub
Solving math problems​
Serverless math solving problem workflow from the CNCF Serverless Workflow examples built with:
- XState v5 beta
Solving math problems on GitHub
Parallel execution workflow​
Serverless parallel execution workflow from the CNCF Serverless Workflow examples built with:
- XState v5 beta
Parallel execution workflow on GitHub
Async function invocation workflow​
Serverless async function invocation workflow from the CNCF Serverless Workflow examples built with:
- XState v5 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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 beta
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.