-
Notifications
You must be signed in to change notification settings - Fork 21
Support request: usage with Nuxt #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The same here. Since I don't think that it is reasonable to use Here's an example to demonstrate my point: // store/index.ts
export const actions = {
logoAction({ commit }, name: string) {
commit('SET_LOGO', name)
}
}
export const mutations = {
SET_LOGO(state: State, data: string) {
state.logo = data
}
}
// pages/SomeComponent.vue
import Vue from 'vue'
import Logo from '~/components/Logo.vue'
import Component from 'nuxt-class-component'
import { Getter, Action } from 'vuex-class'
@Component({
components: {
Logo
}
})
export default class extends Vue {
@Getter('logo/logo') logo
@Action('logo/logoAction') logoAction
created () {
this.logoAction(12) // no error here!!!
}
} @pkej have you found any solution? |
Sorry folks, I have no experience with nuxt, so can't comment here. One option is to try and take this up with the author of vuex-type-safety. This guy forked from vuex-typex some time ago and may have an idea of how nuxt integrations could work. |
From your documentation it seems this is a pattern, and as such I can't find any export I can use in a plugins context in nuxt.config.js, and since I'm just starting out With TypeScript I have no clue, except looking at code from different repositories, and Learning TypeScriptl
I hope you can advise on how to use it with Nuxt.
The text was updated successfully, but these errors were encountered: