Answer the question
In order to leave comments, you need to log in
How to implement the preservation of information on the page when navigating between pages?
Understanding vue-routers and HTML History. I just can't understand how to save the data that is on the page before switching to another page, and how to restore this data accordingly when returning to the page?
Please tell me, it would be nice with an example!)
Answer the question
In order to leave comments, you need to log in
Are you getting data asynchronously on the page itself? If so, then transfer it all to vuex - in state data, in actions - to receive them. The actions themselves can be launched in the beforeRouteEnter component hook.
In case you don't want or can't use vuex, write everything in localStorage)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question