XState-like statecharts implementation for Clojure/ClojureScript #1562
lucywang000
started this conversation in
Show and tell
Replies: 1 comment
-
This is super cool, thanks for sharing! Also interesting to note that sketch.systems uses a partial implementation of statecharts via Clojure as well (I believe). I'll add a section to the docs with related statechart libraries, and will be sure to add this to it 🚀 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been using xstate in a js project with success, and missed it when working some clojure project, so I write a statechart implementation in clojure/clojurescript, https://github.com/lucywang000/clj-statecharts.
The interface and API is strongly inspired by XState, but properly tailored to the language features of clojure. For example, here is how a machine is defined in a real world projects with clj-statecharts.
As I implement it, I could clearly see the elegant design of XState's two layers: an immutable layer of state & transitions, i.e.
const newState = myMachine.transition(currentState, event)
, and a stateful service layer on top of that that's easier to use in real world projects.I'd like to say a big thank you to this amazing project! ❤️
Beta Was this translation helpful? Give feedback.
All reactions