Releases: dayhaysoos/use-shopping-cart
Releases · dayhaysoos/use-shopping-cart
v3.0.0-beta.3
React API has changed with this version
With the switch from just being a hooks library to a redux implementation, there have been some major changes to how you use the React version of this library.
- the
stripe
value in theCartProvider />
needs to be your Public Stripe API key.
Redux doesn't like non-serializable types being passed into it, to mitigate this we had to set up a middleware that handles initializing the Stripe object for you. addItem()
API has changed to using 2 params instead of 4.
addItem(productObject, optionsObject = {count: 1, product_metadata: {...}, price_metadata: {...})
The second param is optional, but under the hood, it creates a default for the options object where count
is 1
README Revamp
No major changes.
No minor changes.
No patches.
Non-package related changes:
The README and CONTRIBUTING markdown files were updated. Added the LICENSE
and CONTRIBUTING-SERVICES.md
files. Added Carbon code screenshots in /assets/
. Added CartProvider
's mode
prop to the docs. Added cart display management utilities to the docs.