Skip to content

Initialize State at app startup #9923

Discussion options

You must be logged in to vote

@JokerMartini

The vuex store is a good place to put your user settings, except it does not persist data by default. So you'll loose all the settings the user changed after a refresh or a new session. You can either use something like vuex-persist( vuex plugin) or populate the store from localstorage ( use the quasar plugin, also you'll have to set the values in localstorage when the user changes settings). You can use a boot file with access to the store to run your init.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JokerMartini
Comment options

@ontwikkelfabriek
Comment options

Answer selected by JokerMartini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants