Skip to content

2 posts tagged with “state”

View all tags
10 minute read

David Khourshid

世界需要另一个状态管理库吗?可能不需要,但如果你对 XState 感兴趣,你一定要看看这个。

XState Store 是一个受 XState 启发的简单且小巧的状态管理库。如果你只需要一种方法来更新存储中的数据并订阅存储中的更改,XState Store 适合你。它是:

  • 极其简单。提供初始上下文和过渡函数给 createStore(…) 函数,你就可以开始了。
  • 极其小巧。压缩后小于 1kb。
  • 与 XState 兼容。共享与 XState 相同的 actor API,使得在需要处理更多复杂性时,集成/迁移变得容易。
  • 额外的类型安全。用 TypeScript 编写,自动从你的上下文和过渡中推断出强类型的事件和快照。
  • 基于事件。与 XState 一样工作;发送事件以触发过渡。
  • 支持 Immer。通过 createStoreWithProducer(producer, …) 轻松添加 Immer 以进行“可变”上下文更新。
5 minute read

Gavin Bauman

The Stately team is very excited to announce a new feature we’ve been working on for quite some time! Join us in welcoming Stately Sky to the Studio. Lovingly built with PartyKit, Sky is our new serverless platform for running workflows within the Studio. With Sky, users may now run their statecharts as live machines in minutes, complete with XState v5 actors and multiplayer support.