Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

Files

Latest commit

 

History

History

reactHooks-redux-js-buy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

reactHooks-redux-js-buy-sdk

An example using js-buy-sdk built with React and Redux. This project was bootstrapped with Create React App.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone https://github.com/Shopify/storefront-api-examples.git this repository
  • cd storefront-api-examples
  • cd reactHooks-redux-js-buy
  • yarn install

Configuring

If you would like to connect your store to this example, open up src/redux/ducks/shopify/index.js and update the domain and storefrontAccessToken at the top of the page:

const client = Client.buildClient({
	storefrontAccessToken: "your-storefront-access-token",
	domain: "your-shop-name.myshopify.com",
})

To fetch a collection, uncomment the collection functions in src/components/App.js, and in src/redux/ducks/shopify/index.js

function getCollection()
fetchCollection()

React-icons are used as a dependency, but could easily be changed to something else.

Running

Start a local server:

yarn start

Further Reading / Useful Links

Contributing

For help on setting up the repo locally, building, testing, and contributing please see CONTRIBUTING.md.

Code of Conduct

All developers who wish to contribute through code or issues, take a look at the CODE_OF_CONDUCT.md.

License

MIT, see LICENSE for details.