A
A
Artem Voloshenko2021-03-04 12:39:33
Vue.js
Artem Voloshenko, 2021-03-04 12:39:33

Local storage, vue js using vuex!?

Another question is whether it is possible to do without a server if I want the user to have a page with data, an interface, that is, buttons with links to his place of work Instagram, etc.
I want to make it so that the user can change his data, that is, change links to his contacts, by itself entering a password and login, is it possible to use only vuex?
Without a database and a server? !
The logic is such that if the user is not authorized, then the router does not give him the opportunity to go to the change form, if he entered the password, he goes to the page with the form, enters data in each form, possibly adds new forms or deletes those that he does not need for the business card page.
We save this data in the store by mutation and action, that is, we save it.
From here we render from the store the data that he entered on his main page.)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kotaro Hiba, 2021-03-04
@lina666

If I understand correctly, you need the vuex-persistedstate plugin - saves the vuex store to localStorage and then when you enter the page, though it will be more of a toy than a working application and everything will be stored locally by the user, you can also connect mongoDB for example and use nuxt - middleware as a proxy for database queries, mongo is an online database roughly speaking

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question