3 ms·
A lot of state either never or rarely changes, so one must wonder if you really need a lot of complexity to manage all of that. Some state does change a lot, a
by Beltalowda 4y ago
A lot of state either never or rarely changes, so one must wonder if you really need a lot of complexity to manage all of that.
Some state does change a lot, and for that: sure. But if you just have currently logged in user or some such (which is quite often the case): meh, it just seems like a complex way to set a global variable.
This week I spent some time removing the Vuex state management in favour of window globals and it made everything a lot simpler and the bundle size a lot smaller (the other option would be to migrate to Pinia, which is significantly smaller than Vuex, but then I'd probably have to update to the next incompatible version in 2 years, and this seemed more robust).