Vue-class-component: Exapmles of usage of Mapped actions inside the calls

Created on 21 Mar 2017  路  4Comments  路  Source: vuejs/vue-class-component

Hi,
Would it be possible to provide some examples on how to use mapped actions and mutations inside the class? I read the https://github.com/vuejs/vue-class-component/issues/56 it shows how to map them but does not show how to use this mapped mutations and actions. If you do something like this

@Component({
  methods: {
    ...mapActions('
      'doSomething'
    )
  }
})

export default class MyComp extends Vue {
    test() {
        this.doSomething('test')
    }
}

It will not have an access to doSomething method inside the class.

need repro

Most helpful comment

How about using vuex-class?

All 4 comments

How about using vuex-class?

@kaorun343 Thanks, I saw this library already but haven't tested it yet, I thought there was a way of going without it. But it seems there is no other option at the moment.

If that the case, please provide the example repo that reproduce this problem.

Closing for inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kabaluyot picture kabaluyot  路  3Comments

silkentrance picture silkentrance  路  6Comments

viT-1 picture viT-1  路  4Comments

backbone87 picture backbone87  路  4Comments

tonypee picture tonypee  路  6Comments