2 ms·
XState is fantastic for isolated pieces of complex state. Like a UI widget with action driven changes or a user’s auth state or a bells-and-whistles API request
by Swizec 6y ago
XState is fantastic for isolated pieces of complex state. Like a UI widget with action driven changes or a user’s auth state or a bells-and-whistles API request. But it’s not a replacement for state management as such.
Here’s an example where I refactored a complex usereducer+context to xstate https://swizec.com/blog/react-context-without-context-using-xstate-codewithswiz-14-15 https://swizec.com/blog/react-context-without-context-using-...