Cool project! In the context of Redux, I suppose it'd enhance reducers somehow, would you like to share with us your implementation of the counter example for instance?
Thanks, @romseguy! I'm going to put up a clear example pretty soon, actually. Check back in 5 minutes!
Here is a non-trivial example (more complicated than a simple counter) with React and Redux: https://github.com/davidkpiano/estado/tree/master/examples/vending
Let me know if you find that helpful! :smile:
More than helpful actually, it's like reducers on steroids! On the top of that, who's not familiar with state machines? I'll be diving in the library code, and see if I can contribute somehow. A quick thought for now would be to propose an alternative to the DSL like using nested objects, but you probably already thought about that.
Hey, good suggestion! You actually can pass in JSON objects written in SCION (a JSON implementation of SCXML). The only problem with that is that it's extremely tedious, haha.
What I really want to get moving on is meaningful error messages, such as when the developer forgot to define a state or a transition is missing.
is this example spoken of above not available now?
@zz-james Not yet, as the above was based on an earlier version of the library. However, look 馃敎 for a Medium article on how to incorporate it in existing projects, and I'd love to take suggestions for examples.
Hi David, I was looking around for either the outdated example linked above, or a medium article w/ an updated xtstate/redux example but was unsuccessful. Would you be able to make the old example available? I might be able to see how that works to fit it to my use case (with Angular and ngrx).
@jmcmichael Examples are coming 馃敎 this week! I'm working on releasing V2.0 (largely the same API as 1.0 but with tiny breaking changes for better type safety/predictability) and want to base the examples on that.
Most helpful comment
@jmcmichael Examples are coming 馃敎 this week! I'm working on releasing V2.0 (largely the same API as 1.0 but with tiny breaking changes for better type safety/predictability) and want to base the examples on that.