vue-meteor-demo icon indicating copy to clipboard operation
vue-meteor-demo copied to clipboard

Decoupling supply to state (for ~forms)

Open janat08 opened this issue 7 years ago • 3 comments

If you're dealing with state that has lots of variables then putting DB into the reactive loop is a bad idea in liu of operating on getter which you can't do since you can't apply mutations on getters. More specifically is that if you were to use vuex for filters, and would like to play around with them before using those to subscribe to feed.

janat08 avatar Jun 26 '17 13:06 janat08

  inject: ({ Filters }) => ({
    **state**: {
      'groups': () => Filters,
    },
  }),

janat08 avatar Jun 26 '17 15:06 janat08

I guess the idea then is to initialize stuff properly if its used for forms (initial state), such as filters.

janat08 avatar Jul 08 '17 01:07 janat08

So yes, adding arrays is likely tricky since documentation just omits those, and you can't just redefine state, which I suppose vue-supply can't do either.

janat08 avatar Jul 08 '17 01:07 janat08