Quick start
Get up and running fast with the quick start
yay-machine borrows the best ideas from other JS/TypeScript state-machine and state-management libraries.
It will feel familiar to XState users, with features including:
And yay-machine brings new ideas of its own:
interface
). They are an object
with a name
and any associated data. Different states may have different associated dataWe prefer contemporary accessible language, to traditional academic terms.
yay-machine has only a handful of concepts and the API is minimal
These features can be combined to model just about anything.
It should be quick to learn, and have a minimal ongoing cost-of-ownership.
yay-machine is a tiny package and won’t bloat your app bundles.
Minimal implementation means minimal overhead and you can trust yay-machine with your high-performance workloads.
The core yay-machine state-machine library has zero production dependencies.
It won’t bloat your node_modules/
and you won’t have to worry about having to patch some security vulnerability or compatibility issue in a 3rd-party package that yay-machine depends on.
We ❤️ TypeScript and want the best experience for TypeScript developers with state-machines.
Each state in yay-machine is a type, giving you more compile-time confidence.
Quick start
Get up and running fast with the quick start
Examples
Checkout out our various examples to demonstrate solving problems with with yay-machine
Reference docs
Get detailed explanations of concepts and application in the reference docs
Articles
If you’re new to state-machines, read our introduction. If you already have some experience, learn why yay-machine exists, and see the comparison with XState