Bunshi helps you create xstate machines per component or other scopes, instead of only globally.
You can use Xstate to define a machine that is shared across your application, too.
Why Bunshi with xstate?
Bunshi helps scope your XState services. Notice how in this example you didn’t need to touch your Counter component to move the state to being global or component scoped. Bunshi helps remove boilerplate and centralize your state management tools.
- Use XState for global state stores
- Move state without touching components
- Share machines across different pages, components or sections
- Keep your state logic decoupled from your UI