SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
283 stars 130 forks source link

@W-15621213 Add ShopperStores hooks #1788

Closed jeremy-jung1 closed 4 months ago

jeremy-jung1 commented 4 months ago

Description

Add searchStores and useStores hook to commerce-react-sdk.

Types of Changes

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

How to Test-Drive This PR

Checklists

General

Accessibility Compliance

You must check off all items in one of the follow two lists:

or...

Localization

kevinxh commented 4 months ago

there is a package test-commerce-sdk-react in the monorepo that you could use to test the new changes easily.

  1. npm run build in commerce-sdk-react
  2. cd ../test-commerce-sdk-react && npm start
  3. add a new page in the test project to call your new hook
vcua-mobify commented 4 months ago

I also tested the changes using test-commerce-react-sdk and it's working.

The code looks like what we have in our other existing hooks so it's LGTM