Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch API example for shopping cart #73

Closed
dschissler opened this issue Mar 2, 2016 · 1 comment
Closed

Fetch API example for shopping cart #73

dschissler opened this issue Mar 2, 2016 · 1 comment

Comments

@dschissler
Copy link

I'm really liking the Fetch API and I'm having a difficult time imagining how it could be cleanly written for Vuex.

@yyx990803
Copy link
Member

In most cases you would have an extra layer of API abstraction that uses fetch as an underlying implementation detail; for example you'd use fetch for the actual HTTP request inside https://github.com/vuejs/vuex/blob/master/examples/shopping-cart/api/shop.js#L12 (replacing the fake setTimeout).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants