Skip to content

lisachandra/rbxts-xstate

 
 

Repository files navigation

@rbxts/xstate

This project provides a port of the XState library using roblox-ts.

Packages

  • @xstate/core: Fully ported and tested. Provides the core XState functionality for defining and managing state machines.
  • @xstate/react: Fully ported and tested. Offers React hooks and utilities for integrating state machines with React.
  • @xstate/test: Ported but untested. Provides utilities for testing your state machines.

Deviations and Limitations

The following features of the original XState library are not yet fully supported:

  • RxJS Related Features: Features that depend on RxJS observables are not yet supported.
  • Browser Related Features: Browser-specific features (e.g., interacting with the DOM) are not applicable in the Roblox environment.
  • JSON and Inspection Features: Support for JSON serialization/deserialization and inspection tools is incomplete.

Transformer

Due to differences between JavaScript object ordering and Lua table ordering, you may need to use a custom TypeScript transformer rbxts-transformer-xstate. This transformer automatically adds _order_ keys to state nodes in your machine definitions.

About

An attempt at porting XState to Roblox-TS.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 86.8%
  • Luau 11.1%
  • Rust 1.8%
  • JavaScript 0.2%
  • Python 0.1%
  • Shell 0.0%