-
Notifications
You must be signed in to change notification settings - Fork 21
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
Example on how to use with Nuxt #89
Comments
I think the problem with your code above is here:
Instead it should be like this:
You need to namespace the store. |
See for a fully working example: https://github.com/TAC/nuxt-vuex-typescript-example/blob/master/app/src/store/modules/counter.ts |
Little update, there is a new version of the library. This is my solution, feel free to comment :)
|
I am trying to make the library work with Nuxt.
The docs say that what you need is:
To test it, I created a new file in the
store
folder of my Nuxt project. The file contains the class of the example in the docs:I would expect this code to create a new module with the name of the file and relative state (
firstname
,lastname
,specialty
), and the getters defined by the class, as well as actions and mutations.The code compiles, but then the store seems to be empty (from Vuejs devtool):
user: Object (empty)
, and getter are not present at all.How can I make it work? Am I missing something?
The text was updated successfully, but these errors were encountered: