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') +) +``` +