4 ms·
I'm sure they operate differently under the hood (and that's a bit of a black box for me), but as an end-user I can do any of those things with Vuex as well - t
by dabernathy89 9y ago
I'm sure they operate differently under the hood (and that's a bit of a black box for me), but as an end-user I can do any of those things with Vuex as well - time traveling, serializing state, subscribing to state mutations, etc. Doesn't require Dev Tools either, although obviously that's much more user-friendly.
- mythz 9y agoLike I said it's possible but requires additional effort and machinery, with Redux your App already constructs and dispatches state transition instructions/delta messages and renders the plain state object as a first-class construct, whereas other state management libraries need to create foreign artificial constructs to support it.
- dabernathy89 9y agoPerhaps I'm missing something. Vuex state is almost a plain JavaScript object but with Vue's getters/setters on it. I can access the root state object easily with `store.subscribe((mutation, state) => {}`. Mutations feel nearly identical to reducers (but simpler!) and interact with the state as a plain JS object. What `foreign artificial constructs` are we talking about here? EDIT: I assumed Vuex state was immutable outside of mutations, but that's only true with 'strict' mode enabled.