Shopify / storefront-api-examples

Example custom storefront applications built on Shopify's Storefront API
https://help.shopify.com/api/storefront-api
MIT License
1.12k stars 329 forks source link

react apollo example using hooks #119

Closed awongh closed 4 years ago

awongh commented 4 years ago

This is an example of react hooks with apollo.

It's hard to see in the diff, but this new folder is a just a copy of the react-apollo example but with component based react changed out to use hooks, and the apollo client changed out to use the apollo react hook useQuery and useMutation.

Most relevant apollo react hooks changes (useMutation) are in App.js

thanks.

swalkinshaw commented 4 years ago

Thanks @awongh 😄