lmatteis / redux-statecharts

Redux statecharts
122 stars 6 forks source link

Comparison w/ xstateful #2

Open johncmunson opened 5 years ago

johncmunson commented 5 years ago

Hey @lmatteis, I'm really digging this library. One question I have is why a person might choose this over the similar xstateful project. It seems to me that redux-statecharts is ideal for people who are already familiar with and invested in the Redux ecosystem, otherwise perhaps xstateful (and in the future, an official xstate interpreter) might be the better options? Does this sound like a fair assessment?

lmatteis commented 5 years ago

It does make sense to try the other libs.

This is useful if you want to use or are already using Redux.

PROs would be:

You're free to use other interpreters for sure. Depends what you're looking for I guess. Certainly it's hard for something like xstateful or other interpreters to beat the ecosystem of Redux tools, like the dev tools (making the state rewindable - which automatically also allow you to rewind statechart transitions), the docs, the resources and the support.

But the other alternatives certainly offer other benefits. One thing I'd suggest looking into is react-automata which does to React what redux-statecharts does to Redux.

johncmunson commented 5 years ago

There's certainly a number of Redux patterns that I've come to appreciate and would probably be a little lost trying to recreate the whole setup outside of the Redux ecosystem. normalizr, redux-orm, and redux-cycles all come to mind. Now that I've discovered statecharts, I'm super appreciative of the work you've done bridging the gap to Redux!