-
Notifications
You must be signed in to change notification settings - Fork 42
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
Can I access to 'this.$session' on Vuex store? #14
Comments
Same question here... |
same question |
Ok I figured it out.
In Store.js or store/index.js
|
The point is to avoid having to write such logic. |
I'm not sure what you're asking. That is your basic Vuex store setup. How else do you want to use the mutations and getters? This works for us as the session is tied to the Vue instance itself and it persists across tabs and components. |
I managed to access it with |
|
You can only use this.$session.get() or any method on VueSessionStorage when you are in Vue components. But in other files use the following. import Vue from 'vue' Vue.prototype.$session.get("token") |
No description provided.
The text was updated successfully, but these errors were encountered: