@tmorin_sfcc/pwa-kit-react-sdk

0.9.2-alpha.1 • Public • Published
 (                                                                              (    (         )
 )\ )                                                   (  (               )    )\ ) )\ )   ( /(
(()/( (         (  (  (      (         (    )      (    )\))(   '   (   ( /(   (()/((()/(   )\())
 /(_)))(    (   )\))( )(    ))\ (   (  )\  /((    ))\  ((_)()\ )   ))\  )\())   /(_))/(_))|((_)\
(_)) (()\   )\ ((_))\(()\  /((_))\  )\((_)(_))\  /((_) _(())\_)() /((_)((_)\   (_)) (_))_ |_ ((_)
| _ \ ((_) ((_) (()(_)((_)(_)) ((_)((_)(_)_)((_)(_))   \ \((_)/ /(_))  | |(_)  / __| |   \| |/ /
|  _/| '_|/ _ \/ _` || '_|/ -_)(_-<(_-<| |\ V / / -_)   \ \/\/ / / -_) | '_ \  \__ \ | |) | ' <
|_|  |_|  \___/\__, ||_|  \___|/__//__/|_| \_/  \___|    \_/\_/  \___| |_.__/  |___/ |___/ _|\_\
               |___/

NPM CircleCI

A library that supports the isomorphic React rendering pipeline for Commerce Cloud Managed Runtime apps.

Requirements

  • Git
  • We recommend you use nvm to manage node and npm versions.
  • Node ^12.0.0 || ^14.17.0 LTS. We recommend using the latest version of Node supported whenever possible.
  • npm ^6.x

Install Dependencies

npm i

Marking public API functions as experimental or deprecated

To mark a function as experimental or deprecated in code, you can use the utility functions experimental() or deprecate() from progressive-web-sdk/src/utils/warnings within your experimental/deprecated function. This will prompt a warning in the browser whenever your function is used. You can add an additional custom message to the warning by passing a string into the first parameter.

Example usage:

import {experimental} from './utils/warnings'

someExperimentalFunction() => {
  // regular usage
  experimental()

  // the function implementation
}

This is the warning that will print in your browser: [PWA Kit API WARNING]: You are currently using an experimental function: [someExperimentalFunction] This function may change at any time.

import {deprecate} from './utils/warnings'

someFunctionToBeDeprecated() => {
  // with custom message
  deprecate("It will be removed in version 1.2.3. Please use [newFunction] instead.")

  // the function implementation
}

This is the warning that will print in your browser: [PWA Kit API WARNING]: You are currently using an deprecated function: [someFunctionToBeDeprecated]. It will be removed in version 1.2.3. Please use [newFunction] instead.

Documentation

Please see the Documentation README.

Readme

Keywords

none

Package Sidebar

Install

npm i @tmorin_sfcc/pwa-kit-react-sdk

Weekly Downloads

1

Version

0.9.2-alpha.1

License

SEE LICENSE IN LICENSE

Unpacked Size

1.09 MB

Total Files

131

Last publish

Collaborators

  • thibaultmorin