DEV Community

Discussion on: Rsvp to weddings with XState

Collapse
 
droopytersen profile image
Andrew Petersen

Thanks for the feedback. That is a fair point, and my experience with them very much mirrors yours. I agree with you, it's like there is this magical "line of complexity" you'd need to cross to justify reaching for them.

However, I would argue that line feels deceptively far away due to unfamiliarity (rather than merit). Wide spread familiarity would eliminate a lot of the friction we've both experienced with State Machines (getting up to speed, explaining it, etc...).

Use a State Machine?

To compare and contrast, I think the Redux pattern is just as complex, but we have become VERY familiar with it. Familiar to the point where many (including myself) would contend it is over leveraged. For Redux, the line of complexity feels deceptively close.

All that said, your larger point that State Machines are not a silver bullet is very valid, and maybe I should have had a little blurb on when you would and wouldn't reach for them.