[Vuejs]-How to create remember search functionality in vuejs

0👍

The solution is to save the filter in a vuex state that way it doesnt change when u go back as long as you’re still in the same tab and didnt close it.

0👍

If you don’t refresh the page and navigate between the route’s components, it’s best to use Vuex, and on the other hand, if you want the same search results to be stored and retrieved even after refreshing the page, use the localStorage.

Furthermore, Vuex would be good to store large lists of data instead of localStorage.

Leave a comment