Using Vuex with vue3-sfc-loader #117
austinrscott
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I searched for a while and could not find this solution anywhere else, so I decided to try and figure it out alone. I'm dealing with a website where I want the Vuex state to persist across pages. Here's an implementation of that concept using the browser's
localStorage
to cache the Vuex state.https://github.com/austinrscott/vue3-sfc-loader-with-vuex
Hope this helps someone! 👍
If anyone would like to contribute, I'm still trying to figure out what I need to do in order to access the store like normal (i.e.
this.$store.xyz
) from the CachedState component. It is not very convenient to pass the store through thelocalStorage
variable.Beta Was this translation helpful? Give feedback.
All reactions