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
285 stars 135 forks source link

[App Extensibility ⚙️] Ensure that extensions have access to locals (@W-17009267@) #2111

Closed adamraya closed 2 weeks ago

adamraya commented 2 weeks ago

Description

The PR makes local variables available in the React server-side extension by passing them to the extendApp function.

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

  1. Run npm start on template-typescript-minimal project.
  2. Load http://localhost:3000/sample-page
  3. Verify the DEBUG logs in the terminal print the same locals values.

Checklists

General

Accessibility Compliance

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

or...

Localization