avaragado / xstateful

A wrapper for xstate that stores state, handles transitions, emits events for state changes and actions/activities, and includes an optional reducer framework for updating state and invoking side-effects
MIT License
85 stars 2 forks source link

Does not work with XState > v4 #2

Open cpetzel opened 5 years ago

cpetzel commented 5 years ago

In version 4, XState changed the functions that are exported from the actions module. toEventObject was removed.

Here is the commit https://github.com/davidkpiano/xstate/commit/5dd4ca6f8a6e4d615a8db9fd310e228a8ed3bef8#diff-f41e9d04a45c83f3b6f6e630f10117fe

I forked XState and added back the missing functions, and then this lib works fine.

Thanks for the great library!

avaragado commented 5 years ago

@cpetzel Now that xstate v4 includes its own interpreter, you might be better off without xstateful. Do you have a use case that xstate v4 doesn't cover but xstateful does?

cpetzel commented 5 years ago

I am just getting started with XState. I like the fact that this lib lets you change the extended state easily. Good point that I can probably just role my own interpreter that manages extended state similar to this library...