{"_id":"@cullenbond/use-local-storage-sync","_rev":"7-39059d1c2e33cbf808db2de6f7ff1099","name":"@cullenbond/use-local-storage-sync","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.0":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.0","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"1e89469206e5f0885363d0a729590e43570d604c","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.0","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-BwHrWPEIzmL5qkbIBYr3e3cl1VFfcNZMrSeEtkIUP2QRlgBorawPNBG6bffjDp0YgTWGWSBMHuVnoG3xaPXVZw==","shasum":"8dfcd769cf32876af1b7b8c9060ab6d673f8c0d6","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.0.tgz","fileCount":6,"unpackedSize":8402,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPhF2+TcYQjJCXR82zmPPqOpSUQ+eETNTONTUmEL1JYwIgJvqYdwhX9SIedOsMEE1AIL8RDHNPxRwLRp30ndJY6uI="}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.0_1709272150570_0.6950766354289584"},"_hasShrinkwrap":false},"1.0.1":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.1","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"b0a8369ff19497140a4f6be580dad9265edb3f10","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.1","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-6wFMaTLyTAAu7P22HYgctjXWz+vQ2D/+655QWbAoGSEDYq0zCS+6fpS7+7mQhsJ34ppAjZVS6xLqeiIN1JcZcw==","shasum":"fed842ac2bbd2f24aa62ac77685c810d1e3669b5","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.1.tgz","fileCount":6,"unpackedSize":8414,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg1dljTi76YDgVbzeMxwZR7TH9PPKiXT17HAyveglKuQIhAIxezH85mR0WTlfSZufnDhc+IO/XrjoccJS+gO1+NOyW"}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.1_1709272408586_0.2533371686226267"},"_hasShrinkwrap":false},"1.0.2":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.2","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"eb2acc17bd375196cbc5cf9ed41143abb6f53c9e","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.2","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-1Xy0eILLCmc6C2ATJ9JVVZ18Z3dakA2EX62x6J4tURdQHpE1ifys3luKs9wBwleX8/1bNyePrwfFhwgo8zXJGg==","shasum":"7a19e973b9b70697e9491105d21b83d403658e2c","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.2.tgz","fileCount":6,"unpackedSize":8596,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw1k0T5aUVx6vJmRni/QnWoTU3Gy62M6wyDrbNx2b91wIhAK5oyzUZSMGw3EPO/BD91ranbJQ/yyjWMbIJEokG5Rty"}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.2_1709274957644_0.16444720336133867"},"_hasShrinkwrap":false},"1.0.3":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.3","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"cd17a388324dfaf26bc45ade7b01d35b8aac53db","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.3","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-h2nwjP3qnXscodLZLvRYMGxWqKN/FFKPV39t0qlZ4M3BvkUbyZXWZGnjB0HBXB9bf4BupTSF28MvimJ7oJ5l3g==","shasum":"15b3148112d28b26e946e4967353b21fbd192446","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.3.tgz","fileCount":6,"unpackedSize":8465,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoieBbFNnEWlZQMRTEjGJblOUTMxFzizXAnrHqgGFCIAiEAqItrPJEBCMzw3BCPiRWycV5OJSqqj0Qld9/K6JmZVW4="}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.3_1709275338602_0.23577989438265368"},"_hasShrinkwrap":false},"1.0.4":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.4","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"2585e4415d998e01704013f2ef6788b4d4941609","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.4","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-/oDs7F58h3/gvKUc+xy+/NDCTcGmaGatyFiDSUj0BPco/bqAxhDFK3tGyX+c2+WmyylwMvCAKSchc+YIJmgRSQ==","shasum":"40e03ed04de31088c7971a0e36b2aece8941e819","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.4.tgz","fileCount":6,"unpackedSize":8522,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG710Oc3MtQC8EcrWU4BxCEWbYuL6/WhpQzX9Y7JW+nSAiBpxiDZbMCbUQh8iCCjyqbN/R57a9/mFf7siLYzWV5VEQ=="}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.4_1709275685205_0.534431617742058"},"_hasShrinkwrap":false},"1.0.5":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.5","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"5b228cd544f88b054621447134ffbc61491a4ade","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.5","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-TCwk9Pk3f97aUAHhTGE8GjhoxruTTolw+5hnRfQufZ8GrNv8XkunFtv2ZThplEmyJZ9WRyNVFiKVRAGQ8ZiZ3A==","shasum":"8e7130b37e5bf6a7d1b6d1f081bd777b86b9622d","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.5.tgz","fileCount":6,"unpackedSize":8531,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcN2NpzEWKcOTOQHbrPZJ/Ix0Ddz0xsg/sj7ojhqoHzAIhANpVaf8KFThaKjya+QHcof0qBbEzTkH/K3Pdimi/aM1z"}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.5_1709276652957_0.46530473665756444"},"_hasShrinkwrap":false},"1.0.6":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.6","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"15a97c96481ff5cc4351cf5c478fccd59410a5fa","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.6","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-t1+caRT8Oy1DLopSyEHIhSXIEAmoGRN3zlG4rJZBMmam8Tzw6YCkay9dGAGvs7Jbys3lrrGfAwNCljLZlFCyEQ==","shasum":"8e7afe5b864d0a712beb33ef75cfa82718816122","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.6.tgz","fileCount":6,"unpackedSize":6622,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuexv0gyO7ET9DWq4MTn/WlbcEHmKNjKTkfYQ/NIyDUgIhAMw3Ki7dKBNm3AJebYitAXzd/6SNSz8kIDVXBdGKHksV"}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.6_1709302445128_0.7677364484000142"},"_hasShrinkwrap":false},"1.0.7":{"name":"@cullenbond/use-local-storage-sync","version":"1.0.7","type":"module","description":"React hook to save state to local storage and sync when updates are made to local storage","main":"dist/index.js","scripts":{"build:dev":"rollup -c --environment NODE_ENV:development","build":"rollup -c --environment NODE_ENV:production"},"keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"author":{"name":"Cullen Bond"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","typescript":"^5.3.3"},"devDependencies":{"@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.61","rollup":"^4.12.0","tslib":"^2.6.2"},"types":"./dist/index.d.ts","gitHead":"560a771bb50e5f62391716f4e53d1dd5c06eccbd","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","_id":"@cullenbond/use-local-storage-sync@1.0.7","_nodeVersion":"19.0.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-oePc2/jhVqWpus6LmHoi9U/9flRQtW0fjxVOz4Tp9HWalLBTgIJdF/wEi+LbxfHPLK1+UJqa7+eC8Lk0Tald0Q==","shasum":"b9b3b1acd212a2c2d41a31cca3bec2567c4e1c86","tarball":"https://registry.npmjs.org/@cullenbond/use-local-storage-sync/-/use-local-storage-sync-1.0.7.tgz","fileCount":6,"unpackedSize":6629,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtUDxjLgQ0fakhPWWl6oNXLvgy0Fix3E1VKIlkuFxGqAiEA2RJw5wTM6zJgiF76Pi+967mjPJJQsvLwgyH2hLGJxco="}]},"_npmUser":{"name":"cullenbond","email":"cjbon07@hotmail.com"},"directories":{},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-local-storage-sync_1.0.7_1709318295630_0.28738933321258076"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-01T05:49:10.487Z","1.0.0":"2024-03-01T05:49:10.703Z","modified":"2024-03-01T18:38:16.526Z","1.0.1":"2024-03-01T05:53:28.753Z","1.0.2":"2024-03-01T06:35:57.834Z","1.0.3":"2024-03-01T06:42:18.759Z","1.0.4":"2024-03-01T06:48:05.357Z","1.0.5":"2024-03-01T07:04:13.146Z","1.0.6":"2024-03-01T14:14:05.259Z","1.0.7":"2024-03-01T18:38:15.871Z"},"maintainers":[{"name":"cullenbond","email":"cjbon07@hotmail.com"}],"description":"React hook to save state to local storage and sync when updates are made to local storage","homepage":"https://github.com/StaticSpark/use-local-storage-sync#readme","keywords":["react","localstorage","persist","data","sync","data","pub","sub"],"repository":{"type":"git","url":"git+https://github.com/StaticSpark/use-local-storage-sync.git"},"author":{"name":"Cullen Bond"},"bugs":{"url":"https://github.com/StaticSpark/use-local-storage-sync/issues"},"license":"MIT","readme":"# useLocalStorageSync Hook (React)\n\n#### To get started, simply run the following cmd to install the package:\n\n    npm install @cullenbond/use-local-storage-sync\n\n#### Then import into the hook into your react component.\n\n    import { useLocalStorageSync } from \"@cullenbond/use-local-storage-sync\";\n\n#### Example 1:\n\n    const [showButtons, setShowButtons] = useLocalStorageSync(\"showButtons\", false);\n\n#### Example 2:\n\n    const [persistedCount, setPersistedCount] = useLocalStorageSync(\"persistedCount\", 0);\n\n#### Example 3\n\n    const [userId, setUserId] = useLocalStorageSync(\"userId\", \"bob\");\n\n#### Example 4\n\n    const [groceryList, setGroceryList] = useLocalStorageSync(\"groceryList\", [\"Apples\", \"Oranges\", \"Bananas\"]);\n\n## Advanced Loading and State sync usage\n\n> An abstract example of load logic using initialization value, to avoid infinite load loops. If you persist and load data to data stores bi-directionally.\n\n    const [showMenu, setShowMenu, showMenuError, showMenuInitialized] = useLocalStorageSync(\"showSettingsMenu\", true)\n\n    useEffect(()=>{\n        if(showMenuInitialized){\n            // do things that might otherwise cause side effects\n            // update redux store to localStorage value, after initialization\n        }\n    },[showMenu])\n\n    useEffect(()=>{\n        if(showMenuInitialized){\n            // do things that might otherwise cause side effects\n            // update localStorage value, after initialization and when state is updated\n            setShowMenu(state.showMenu)\n        }\n    },[state.showMenu])\n\n## Parameters:\n\n1. Value Key Name\n\nSimilar to how JS Map() works we will identify the name of our value that is to be stored.\n\n> It is important to note that if you might to be persisting several variations of a name, to make sure the key name is unique.\n\nExample:\n\n    const [buttonClickCount, setButtonClickCount] = useLocalStorageSync(\"buttonClickCount\")\n\n2. Default Initial Value\n\nThe initial value takes precedence if no existing values have been stored locally.\n\nExample:\n\n    const [buttonClickCount, setButtonClickCount] = useLocalStorageSync(\"buttonClickCount\", 0)\n\n3. (Optional) getItem function\n\nMethod called when retrieving a stored value, before setting value to be used in state.\n\n> The hook will json.parse() the stored value, by default\n\nExample:\n\n    const [buttonClickCount, setButtonClickCount] = useLocalStorageSync(\"buttonClickCount\", 0, value => JSON.parse(value))\n\n4. (Optional) setItem function\n\nMethod called when setting a stored or synced value before setting the value.\n\n> The hook will json.stringify() the stored value, by default\n\nExample:\n\n    const [buttonClickCount, setButtonClickCount] = useLocalStorageSync(\"buttonClickCount\", 0, value => JSON.parse(value), value => JSON.stringify(value))\n\n## Avoid errors\n\n- Overusing the hook with the same key can cause performance issues.\n- Do not use with the same key in re-used components.\n  - unless you intentionally want to reference and update the same value\n\n## Common Usecases\n\n- Storing website settings.\n- Initializing Redux store on load.\n- Persisting data for offline scenarios.\n- Updating state across tabs and windows, in same browser\n\n## Anti-patterns:\n\n- Avoid using in a compononent that is re-used often, and key points to the same value.\n- Do not persist data that doesn't need to be stored long-term.\n\n## Return values\n\n1. value\n2. setValue\n3. error\n4. initialized\n","readmeFilename":"README.md"}