What is Tuex? - Raiondesu/Tuex GitHub Wiki
Tuex is a centralized state management library for Vue.js. It takes heavy inspiration from the Flux pattern (especially Vuex), but has some crucial differences.
Differences from Vuex (and when to use it)
Vuex is very restrictive when it comes to data management. Sometimes to such an extent that it forces to write the most of the store code as a redundant mess. It happens because vuex forces to change the state only through commits (that can not call other commits) and nothing else. And when the app has a giant state with a little-to-no actions, the amount of commit functions and corresponding action functions with semantically duplicate code breaks all the structure and predictability.
Such a strict approach to a data-management architecture, though, is useful in the case of a very large app to avoid unexpected or unpredictable changes. So when it comes to small or medium-scaled apps, there are very few options.
Tuex fills this medium-to-pre-large SPAs gap.
The main goal of Tuex is to make state-management less complex for small-scale apps, while keeping the flexibility and scalability of Vuex.
With respect to a typical Flux pattern, Tuex's main difference is that it makes state structure a bit less organized and much less restricted:
But if we consider the real potential of such a scheme with all of the benefits and possibilites, it turns out to be a lot more like this:
And nobody will blame you. Inheritance, factories, builders, singletons... anything! Anything is possible and 100% correct inside of this giant blue rectangle.
Such an approach proves useful mostly for middle-scaled or growing apps or when both Vuex and global event bus
feel restricting.
Tuex is a response to a quote of Dan Abramov, the author of Redux:
Flux libraries are like glasses: you’ll know when you need them.
It is what you get, when glasses are not a good fit.