ktsn / vuex-class

Binding helpers for Vuex and vue-class-component
MIT License
1.73k stars 86 forks source link

Add the ability to specify a subfield #28

Closed yarkovaleksei closed 6 years ago

yarkovaleksei commented 6 years ago

I want to use this syntax:

@State('foo.nested.bar') bar

Now for these purposes I have to specify the function from which I return the field I need.

@State(state => state.foo.nested.bar) bar

ktsn commented 6 years ago

I'm not willing to add such feature because:

  1. It's impossible to type check.
  2. It would provide poor error message if there is typo on property name.
  3. Vuex does not support that.