vue-cookie icon indicating copy to clipboard operation
vue-cookie copied to clipboard

How does this library differ from Veux State

Open acrolink opened this issue 8 years ago • 2 comments

acrolink avatar Oct 14 '17 16:10 acrolink

@acrolink , as far as I know, Vuex State help you pass data more easily without bussing or creating properties or other ugly process that makes your code very unreadable and hard to follow. When you refresh that data you stored with Vuex gets reseted to the default value. vue-cookie goal is to help you store data that is needed to persist throughout the session. Other approach you can use without using the vue-cookie is to use the vue-resource and play with the urls, like: url/:id and when you refresh you can fetch that :id and do something with it.

I'm sorry if I give you the wrong information. This is my best answer I can provide you.

juanr2001 avatar Dec 27 '17 19:12 juanr2001

@juanr2001 One limitation I had noticed with Vuex State is lack of data persistence on page navigation (between pages). As you said, using cookies solves that issue. So, would you recommend using this library to store say shopping cart items before checkout on a commerce site?

acrolink avatar Dec 27 '17 20:12 acrolink