commercetools / sunrise-spa

SUNRISE shop template as a single-page application
https://sunrise-spa.now.sh
Apache License 2.0
51 stars 78 forks source link

Consider using Apollo cache for local state #121

Closed lauraluiz closed 5 years ago

lauraluiz commented 5 years ago

Instead of using Vuex, Apollo Cache allows us to save and read local state. https://dev.to/n_tepluhina/apollo-state-management-in-vue-application-8k0

Pros: get rid of any additional state management library such as Vuex and keeping only one state source.

Cons: Vuex is very well known and documented, whereas using Apollo for that is still quite obscure and difficult to find information of it.

zeina-idris commented 5 years ago

@lauraluiz what about this issue? That we are actually using Vuex for local state

lauraluiz commented 5 years ago

Yep, I would drop this idea. Specially now that we will have it stored in the localstorage.