4 ms·
Thanks for the kind words about XState (creator here)!
by davidkpiano 6y ago
Thanks for the kind words about XState (creator here)!
- jen729w 6y agoIt’s a big boon to the development of tiny simple UIs! I use XState to manage my login state. Not logged in, trying, logged in, log in failed, trying log out, logged out. The thing I love is the confidence the machine gives me. Unless I’ve buggered up completely, it basically can’t be wrong. That’s incredibly reassuring. Thanks for XState and all the work you put in to it. It’s an amazing thing.
- adamkl 6y agoFunny you mentioned login state. I've used it for the exact same thing. I had a "userService" machine (embedded in a React UI) that handled all the legwork of an OAuth2 flow and ended with the user in an "authenticated" state with their details as part of the machine context (for use in any other part of the app via a custom hook). You are absolutely right, it couldn't be wrong. It always just worked exactly the way it was supposed to. I'm now working on a project that handles logins via a set of disconnected boolean flags flowing through redux and it is a mess.
- compscistd 6y agoI didn’t know a thing about state machines and lately would deprioritize your xstate frontendmasters course on my learning queue just out of ignorance. For whatever reason, I just watched your React Rally video and I can think of a bunch of projects where state machines would help get the UI in order! A “legacy” ui we have (much older than a week) has these state flags (and then some): IsConfirmed IsSent IsSentAndConfirmed IsDraft IsLoading IsInTheEther IsError IsNaN I want to rewind the clock for a redo on that mega component but I suppose refactoring will have to do. Again, thank you for that great talk!