4 ms·
Like I said it's possible but requires additional effort and machinery, with Redux your App already constructs and dispatches state transition instructions/delt
by mythz 9y ago
Like 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.