From f373c09ae4760bc94e039f4177ee7de8cd43a11c Mon Sep 17 00:00:00 2001 From: Nick DeJesus Date: Wed, 22 Mar 2023 22:34:42 -0400 Subject: [PATCH] added persistKey page --- docs/docs/usage/configuration/persistKey.mdx | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/docs/usage/configuration/persistKey.mdx diff --git a/docs/docs/usage/configuration/persistKey.mdx b/docs/docs/usage/configuration/persistKey.mdx new file mode 100644 index 00000000..5cb60e0a --- /dev/null +++ b/docs/docs/usage/configuration/persistKey.mdx @@ -0,0 +1,31 @@ +--- +title: persistKey +id: persistKey +--- + +This property allows you to override the default key used to persist the cart in `localStorage`. By default, the cart is stored under the key `root`. + +```js +import ReactDOM from 'react-dom' +import { CartProvider } from 'use-shopping-cart/react' + +import App from './App' + +ReactDOM.render( + + + , + document.getElementById('root') +) +``` +