DEV Community

Discussion on: Replacing Vuex with XState

Collapse
felix profile image
Felix Guerin Author

Sure, I don't see why you couldn't do that. I also like Vuex a lot, but the goal for me was to not have 2 libraries for managing state in an app and reduce my bundle size as much as possible.

I fail to see how it would be useful to have your actions in a Vuex store instead of your machine config though.

Collapse
mimischi profile image
Michael Gecht • Edited on

I fail to see how it would be useful to have your actions in a Vuex store instead of your machine config though.

It's just inertia. I currently use Vuex actions as a central place for API calls. Putting the actions into FSM would lead to some refactoring -- which is surely doable -- but I'd rather stick with the my approach if possible.

Thread Thread
felix profile image
Felix Guerin Author

Ok I see. I think you could just import your store in your fsm file and dispatch the actions from your machine.