Skip to content

A mid-2020 boilerplate site utilizing React, Redux, TypeScript, and Shopify's Storefront API.

Notifications You must be signed in to change notification settings

princefishthrower/react-redux-typescript-shopify-storefront-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React + Redux + TypeScript + Shopify's Storefront API Boilerplate Code!

To get started, clone this repository:

git clone https://github.com/princefishthrower/react-redux-typescript-shopify-storefront-api-example.git

This app was bootstrapped with create-react-app, so it should install just fine with:

npm install

The only thing to do before running is to add your Shopify store credentials, which are in src/utils/utils.ts:

const client = Client.buildClient({
    storefrontAccessToken: 'YOUR_SHOPIFY_STOREFRONT_ACCESS_TOKEN',
    domain: 'YOUR_MYSHOPIFY_STORE_URL'
});

Until you provide proper credentials, you'll see these errors in the console:

Failed to load resource: net::ERR_NAME_NOT_RESOLVED             your_myshopify_store_url/api/2020-07/graphql:1
TypeError: Failed to fetch                                                                         utils.ts:39

Run the development site with:

npm run start

Build a production version with:

npm run build

This is all described in detail in a detailed Medium post about this code base. I highly suggest reading that so you know what the heck is going on!

About

A mid-2020 boilerplate site utilizing React, Redux, TypeScript, and Shopify's Storefront API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published