{"_id":"@stackoverprof/use-shared-state","_rev":"15-0e560a0a17746d26c8d66fad795b8d0e","name":"@stackoverprof/use-shared-state","dist-tags":{"latest":"2.2.2"},"versions":{"1.0.0":{"name":"@stackoverprof/use-shared-state","version":"1.0.0","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.0.0","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"9b0634e6a9006d7553c80ccd02280406ce4bcfea","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.0.0.tgz","fileCount":9,"integrity":"sha512-6+Hw6mwX4al3WHdd/oSxzxF/O3FzHu91rHN8EPZ99e0OWWzor+rn7FKV05khsvw+rHS2vEQBmHcsfVzVIiqgFg==","signatures":[{"sig":"MEUCIQD/bmLUcFCQ56aBg+sh745dOgonCTMTTvkGKCD7FZGvKQIgGuZnOaBXZMuMwRIfxBImTVqbZqO+iZDP0+3Gk04XVKs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44504},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"d13a1d8a9903feadec0dbe62e9a31f4cf31db7d9","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.0.0_1755484649950_0.47594668887881797","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@stackoverprof/use-shared-state","version":"1.0.1","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.0.1","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"9a920ed2707a2a63d3eb0e2b01625bf7b8393f62","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.0.1.tgz","fileCount":9,"integrity":"sha512-ap4HTCATz44caI/F0fhloYlRc7ukqh58+9fYFbK2pkQkKIpthLJ1S5MfILCGai3Qw4+amuM1tRyM/uJbHZCWtw==","signatures":[{"sig":"MEUCIBE4c9vsd52QZrdTxVgKR7d39UJ3gFqnFOOiC4uPRFHfAiEAouO3IxjXWk6VdZlfew2lspI+sycLJ2wflkDA7vkf35w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44602},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"b269fdb4f881449702987d7387b0d78a7e9dbc62","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.0.1_1755484949607_0.18341622615695874","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@stackoverprof/use-shared-state","version":"1.0.2","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.0.2","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"a2487de19745afe2bcf940034766c9f91f0ce986","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.0.2.tgz","fileCount":9,"integrity":"sha512-UC82LPIpVsJygBR9Y8iCoo22P6ycbgQCWCneY79tjZ+FVPdoq18+Umo7rbY70S/h9QJOCRcIuRKEWo3FGH1Jig==","signatures":[{"sig":"MEUCIHsF9e4BBPrCS7mhg7RnVsJFVpeLd+AWgyCrfj0faTpmAiEA69U5v2pjYctRGJKoplEyWNMB/NiYHpgw/0jb7lv32Ak=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46436},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"caedccc13ec7616233196bd90f5b22d6df2b70aa","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.0.2_1755490030627_0.07676486226076573","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@stackoverprof/use-shared-state","version":"1.1.0","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.1.0","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"a298e4ad3bb14953ef57d1db79d2973ebae8c3d3","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.1.0.tgz","fileCount":9,"integrity":"sha512-UOGAZ3yL+3O3grzn98ZAzeCm/+6k7Knasc9VUIDS5MtcaRMcM+sWqMCzqYHhdX1gYzO3K2D2fMl7Ul/aDsNrNg==","signatures":[{"sig":"MEQCIB0E8M0fr8gWQNGnuP3tl78i3cZOZ370IWra8VoFIQwVAiBaUZzsOmPHX1DFSLXZdzWTYwi26zasBgd5uZOz4QjsNw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50111},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"9b0544a26e1a7f5ee9d8d5f56eaf1fa17ebcf292","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.1.0_1755498767489_0.6402429478249259","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@stackoverprof/use-shared-state","version":"1.1.1","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.1.1","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"6897675b48f8c5c84c378009e75afb67ff7e9b13","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.1.1.tgz","fileCount":9,"integrity":"sha512-F955V44BOMsEViEZzitePglsSvRXKrxxhJVbK5U5eNN/2ZlHi1NINd4CBJYLPMwIp0j97o0oHIWOSQKM7mWaCg==","signatures":[{"sig":"MEQCIDUHXIHIDeFlQbCih+gJAXrYMrTd+gpcwpOnImVH/AgJAiACR1ErD/+zMpNTvLEoGuDOdceO4upOARgrbFl6AQ9tOw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50008},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"164140a7043e324881af2d69c92d095107047b64","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.1.1_1755507009707_0.12655342687329152","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@stackoverprof/use-shared-state","version":"1.1.2","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.1.2","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"a038b75c8b0356035fe6bd46ce1c211ccbca900c","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.1.2.tgz","fileCount":9,"integrity":"sha512-I4v8Pdm5wspuDI8U9Gh6nnVPZeChLOc0yr7TwouKt/qHDyrezVIwQMMFRRS6mMrd5vMcrtwrTRmR6SUVS/8EvA==","signatures":[{"sig":"MEUCIQCDvBI7qf81+0p4wOsFdb61OPORNPAnghtSlSCTfyzuagIgEFLg/fCMPEajnCitp0TFQldG0g874FiDLq3mcw2GLWA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50072},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"e323530b3d2661cb98bc15d64011cc2d67cb734c","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","dependencies":{"swr":"^2.3.6"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.1.2_1755826343532_0.32300803228866326","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@stackoverprof/use-shared-state","version":"1.2.0","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.2.0","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"62985a7171f1e601107dbdc9c3698d3a074ca4a9","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.2.0.tgz","fileCount":23,"integrity":"sha512-h83eSRo0woeBR7kbrIW1aandmW2Q0+dNk8swGVX76llKIMEjvKG1YXMBkRtOsqtcRFjtEPQJnieDGREtAFrsEg==","signatures":[{"sig":"MEUCIQDMhNm6GdQoy/o+JbQ6z3PQr8+JdmTeHsl2/9PBLf2zRwIgS8wAjkwKGlcxMd1jiFW1pGIjFjZ4H+x/QQ5WaWK1o4A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69434},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"bdf52e1693661e9c021812afa4ab294762f7b5d8","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","dependencies":{"swr":"^2.3.6"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.2.0_1755829830095_0.7399668936841137","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@stackoverprof/use-shared-state","version":"1.2.1","keywords":["react","hook","state","swr","localstorage","typescript"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@1.2.1","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"1896a4b83aed2da2700e25db315318c995f54095","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-1.2.1.tgz","fileCount":23,"integrity":"sha512-wAfw/edeKY1PiAZuVlJb6Dfq2Hd2MLbQH++m41TuzWypWxguZhKoWrRHAlWJR9LG00RGD5/riwrGHxVuEH9N/Q==","signatures":[{"sig":"MEQCIFJVNW3n6rEZmtlsOm+TU9XgEqSKgEqja8/+FcNykcdTAiBALX2KdKBBOLP9DamqFJh8eA7dLVxQxeAPmGtx7aIcww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69496},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"def83064dfd127e35a10342cf38895997d5623c9","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A React hook for sharing state across components using SWR with optional localStorage persistence","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_1.2.1_1755836242613_0.8024618573613989","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@stackoverprof/use-shared-state","version":"2.0.0","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@2.0.0","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"ce42107afea5dce648084744248143b97193df95","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.0.0.tgz","fileCount":31,"integrity":"sha512-WDzeUHl232dE7CVsmbvswRbPo7X7HKf7RfjTN6+6dYixdQySan3CHqV8wmJmgOoYJsV616S/sdo29ptXNthWyg==","signatures":[{"sig":"MEUCIQCgYAljtJhLp/BF3THaorvEtJI2Ce8DH+53a5Cla8+hZgIgFkzgPPsuWYuqAoXiaJO8ro6WRSqByWhpBPHLKTaD4I4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150515},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"b1795c4f7e019d1cb3760695f917cbff8323f6ef","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight React hook for sharing state across components with optional localStorage persistence and cross-tab sync","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_2.0.0_1755837163237_0.48041170303141834","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@stackoverprof/use-shared-state","version":"2.0.1","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@2.0.1","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"13328e04a4d06c58ae112839cfe9c0d66e4fff4b","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.0.1.tgz","fileCount":31,"integrity":"sha512-w6Uo3zDTSLQFZ73FD3yBTerWpPmRE21S2w9h9qkqCjHSjGhcGZVFVdtY/T5S0m606Aqxy+4VV2RK9/dv3IsZsg==","signatures":[{"sig":"MEUCIHEghYAZ2LPXb9ewT1uYmzeX/hWTYPSzzQwzGGrN1My4AiEA/YF+JPN+A0sU1+qy2KDLj5gZy+RGoPqpjVaPhEkq/Rc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149054},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"47cebfcf7a6da5b485a4e33acfc35907ec00a3a7","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight React hook for sharing state across components with optional localStorage persistence and cross-tab sync","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_2.0.1_1755842141629_0.3216643207115939","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@stackoverprof/use-shared-state","version":"2.0.2","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@2.0.2","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"75274a953cf16c9bf6ed028e17802157d91767c2","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.0.2.tgz","fileCount":31,"integrity":"sha512-C8wE1n2DsOzCWWPKf7XO4PwF4TlqSn3jgAEr/GC9NE9kQRZw+o6QdJzUtbwMNUZXr0GVz/5PuF+f43Y2DCnGJA==","signatures":[{"sig":"MEUCIGVIg5w7XnNIbKosBZ6BV4H6xlPO5pjrhe89mp/+0KmsAiEA9RoZjLMNqFW6kHFap+XL1meJoT7B30AS7JTkUBxgSd8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":151300},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"c0a90bb8696c1c5036a636c749bd01bd03e47c13","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight React hook for sharing state across components with optional localStorage persistence and cross-tab sync","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_2.0.2_1755842590688_0.9986665025201078","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@stackoverprof/use-shared-state","version":"2.1.0","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@2.1.0","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"56018b7a1814e0aa2526165d4ebf6ee15833fff2","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.1.0.tgz","fileCount":31,"integrity":"sha512-kkI7V79u5L0F5Q1DlSlN+DDecyZXsQc8Kh7WPQBl14OtJNORNtxhjBd4lPVlAjFQXQtcXavGcsbyEYBHgu+vkA==","signatures":[{"sig":"MEQCIG34MDRz9viEjoi3v8AXzwz8upStIVMMQpSzmB+9Y/yyAiBfe1+DzT8t5fSWxWIRpd7DLTbsbTmm265UhuuLDBHOmQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":161555},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"c0a90bb8696c1c5036a636c749bd01bd03e47c13","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight React hook for sharing state across components with optional localStorage persistence and cross-tab sync","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"swr":">=1.0.0","react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_2.1.0_1755854178939_0.5117011187977345","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@stackoverprof/use-shared-state","version":"2.2.0","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@2.2.0","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"d21699c86923214a919e9a72b03be8d7ca2ddacb","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.2.0.tgz","fileCount":31,"integrity":"sha512-lap+OG6w/+SfqNtKLFlJfNGKRWNC3mSIa2q/47CyYv6QKmOoGQfHePjic91gmcwwfVHGDH+iC6KoKzfo7dvNCg==","signatures":[{"sig":"MEYCIQDhHnetkZeYGKs2kCu1I22TZBtDrDn4xcVsc5o+2g2vnAIhANzoSC6HaPNFwILu6PxgDct1fW5CWHrw/u+M5aHwH3LE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":161665},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"c0a90bb8696c1c5036a636c749bd01bd03e47c13","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A zero-dependency React hook for sharing state across components with optional localStorage persistence and cross-tab sync","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_2.2.0_1755854496162_0.7198120368766943","host":"s3://npm-registry-packages-npm-production"}},"2.2.1":{"name":"@stackoverprof/use-shared-state","version":"2.2.1","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","_id":"@stackoverprof/use-shared-state@2.2.1","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"homepage":"https://github.com/stackoverprof/use-shared-state#readme","bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"dist":{"shasum":"0755da40517943c8c1ef99e6f2509b45cec88ff2","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.2.1.tgz","fileCount":31,"integrity":"sha512-X7oR9fnyREjPQHeanUOVSeDWUVM5R7sQDKZLOqAiDrCPnUGQoxGOgakzxH63CwVU/Yx6TRbGkD5bEaxarR0HVQ==","signatures":[{"sig":"MEUCIC+w0IHozupm0qRu3FYiQU5Ga1KyjSLb+U5Op3PkTfkBAiEAkUgWCbEmhdkpHLkhqbdBGz+HUu/PGjUZwqJVCH9akSo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":161591},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.esm.js","gitHead":"8ac844018e4e25b776de188ec741021879dd3b1d","scripts":{"dev":"rollup -c -w","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"repository":{"url":"git+https://github.com/stackoverprof/use-shared-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A zero-dependency React hook for sharing state across components with optional localStorage persistence and cross-tab sync","directories":{},"_nodeVersion":"20.18.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.13.2","typescript":"^5.4.3","@types/react":"^18.2.79","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/use-shared-state_2.2.1_1757385888465_0.6684309666938693","host":"s3://npm-registry-packages-npm-production"}},"2.2.2":{"name":"@stackoverprof/use-shared-state","version":"2.2.2","description":"A zero-dependency React hook for sharing state across components with optional localStorage persistence and cross-tab sync","type":"module","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"build":"rollup -c","dev":"rollup -c -w","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"author":{"name":"stackoverprof"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-typescript":"^11.1.6","@types/react":"^18.2.79","rollup":"^4.13.2","tslib":"^2.6.2","typescript":"^5.4.3"},"repository":{"type":"git","url":"git+https://github.com/stackoverprof/use-shared-state.git"},"bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"homepage":"https://stackoverprof.github.io/use-shared-state-site/","gitHead":"90f225643ebcf2981108b516ec026f6803e7d776","_id":"@stackoverprof/use-shared-state@2.2.2","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-/iHD0F9oRPhb3R5NX7CP2g7aL60foCvHaa7MsMYWclFUTjTnRgFgeqjeHuc4BlClMyKQ8HgM9FAgYCneW2K3Fw==","shasum":"fc5a2e4403963b4658b1e66b56b23a8e9603edc1","tarball":"https://registry.npmjs.org/@stackoverprof/use-shared-state/-/use-shared-state-2.2.2.tgz","fileCount":23,"unpackedSize":94400,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC4DoSn7yXxDX863idgxA5pxEn+lu7RRxjP9P2cynGVbAiEA2ru9IG2vTdRUuIy83FBIautiLtfow1NtvSfAXlQCLgQ="}]},"_npmUser":{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"},"directories":{},"maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-shared-state_2.2.2_1770090841417_0.60766802353844"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-18T02:37:29.880Z","modified":"2026-02-03T03:54:01.683Z","1.0.0":"2025-08-18T02:37:30.140Z","1.0.1":"2025-08-18T02:42:29.783Z","1.0.2":"2025-08-18T04:07:10.806Z","1.1.0":"2025-08-18T06:32:47.671Z","1.1.1":"2025-08-18T08:50:09.891Z","1.1.2":"2025-08-22T01:32:23.710Z","1.2.0":"2025-08-22T02:30:30.307Z","1.2.1":"2025-08-22T04:17:22.808Z","2.0.0":"2025-08-22T04:32:43.418Z","2.0.1":"2025-08-22T05:55:41.813Z","2.0.2":"2025-08-22T06:03:10.926Z","2.1.0":"2025-08-22T09:16:19.137Z","2.2.0":"2025-08-22T09:21:36.364Z","2.2.1":"2025-09-09T02:44:48.680Z","2.2.2":"2026-02-03T03:54:01.568Z"},"bugs":{"url":"https://github.com/stackoverprof/use-shared-state/issues"},"author":{"name":"stackoverprof"},"license":"MIT","homepage":"https://stackoverprof.github.io/use-shared-state-site/","keywords":["react","hook","state","shared-state","localstorage","typescript","lightweight"],"repository":{"type":"git","url":"git+https://github.com/stackoverprof/use-shared-state.git"},"description":"A zero-dependency React hook for sharing state across components with optional localStorage persistence and cross-tab sync","maintainers":[{"name":"stackoverprof","email":"r.bintangbagus@gmail.com"}],"readme":"# use-shared-state\n\n[![npm version](https://badge.fury.io/js/%40stackoverprof%2Fuse-shared-state.svg)](https://badge.fury.io/js/%40stackoverprof%2Fuse-shared-state)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)\n\nA lightweight React hook for sharing state across components with optional localStorage persistence and cross-tab synchronization.\n\n## 🚀 Live Demo\n\n**[Try it live →](https://use-shared-state-demo.vercel.app/)**\n\nSee real-time state sharing, persistence, and cross-tab synchronization in action!\n\n## Features\n\n-   🚀 **Simple API** - Drop-in replacement for `useState` with cross-component sharing\n-   💾 **Optional Persistence** - Use `@` prefix for localStorage persistence\n-   🔄 **Cross-tab Sync** - Automatic synchronization across browser tabs\n-   ⚡ **High Performance** - Optimized with minimal overhead using Map storage\n-   🛡️ **Type Safe** - Full TypeScript support with generics\n-   🎯 **Lite SWR** - Built with custom lightweight SWR implementation (~100 lines)\n-   🧪 **Zero Dependencies** - No external dependencies except React\n\n## Installation\n\n```bash\n# Install the library\nnpm install @stackoverprof/use-shared-state\n```\n\n> **Note:** React >=16.8.0 is required (peer dependency)\n\n## Quick Start\n\n```tsx\nimport useSharedState from \"@stackoverprof/use-shared-state\";\n\n// Basic shared state (memory only)\nconst [count, setCount] = useSharedState(\"counter\", 0);\n\n// Persistent shared state (localStorage + cross-tab sync)\nconst [user, setUser] = useSharedState(\"@user\", { name: \"John\" });\n// ↳ Saved in localStorage as \"shared@user\"\n```\n\n## API Reference\n\n### `useSharedState<T>(key: string, initialValue?: T)`\n\nReturns a tuple `[state, setState]` similar to React's `useState`.\n\n#### Parameters\n\n-   `key` - Unique identifier for the shared state\n    -   Regular keys: Memory-only storage\n    -   Keys with `@` prefix: Persistent localStorage + cross-tab sync\n-   `initialValue` - Default value when state is undefined\n\n#### Returns\n\n-   `state` - Current state value (T | undefined)\n-   `setState` - Function to update state, supports value or updater function\n\n## Performance\n\n-   **Memory-only keys**: ~0.1ms overhead\n-   **Persistent keys**: ~2-3ms overhead (includes localStorage operations)\n-   **Cross-tab sync**: Automatic with StorageEvent API\n-   **Memory usage**: Efficient Map-based storage with automatic cleanup\n-   **Re-renders**: Only components using the changed state key re-render\n\n## Re-rendering Behavior\n\n**Important:** Only components that actively use a shared state key will re-render when that state changes.\n\n✅ **Precise targeting**: Only components using the changed key re-render  \n✅ **Parent isolation**: Parent won't re-render unless it uses shared state  \n✅ **Sibling isolation**: Unrelated siblings won't re-render  \n✅ **Performance**: Better than Context (which can cause cascade re-renders)\n\n## Comparison with Alternatives\n\n| Feature              | use-shared-state | Redux  | Context | localStorage |\n| -------------------- | ---------------- | ------ | ------- | ------------ |\n| Setup complexity     | Minimal          | High   | Medium  | Manual       |\n| TypeScript support   | Full             | Good   | Good    | Manual       |\n| Cross-component sync | ✅               | ✅     | ✅      | ❌           |\n| Persistence          | Optional         | Manual | ❌      | Manual       |\n| Cross-tab sync       | ✅               | Manual | ❌      | Manual       |\n| Performance          | High             | Medium | Low\\*   | High         |\n| Bundle size          | Small            | Large  | None    | None         |\n\n\\*Context can cause unnecessary re-renders\n\n## Best Practices\n\n1. **Use regular keys for temporary state**\n\n    ```tsx\n    const [loading, setLoading] = useSharedState(\"loading\", false);\n    ```\n\n2. **Use @ prefix for data that should persist**\n\n    ```tsx\n    const [settings, setSettings] = useSharedState(\"@user-settings\", {});\n    ```\n\n3. **Provide default values for better TypeScript inference**\n\n    ```tsx\n    const [items, setItems] = useSharedState<Item[]>(\"items\", []);\n    ```\n\n4. **Use updater functions for complex state changes**\n    ```tsx\n    setCart((prev) => ({ ...prev, total: calculateTotal(prev.items) }));\n    ```\n\n## Cleanup & Memory Management\n\n### **Automatic Cleanup**\n\n-   ✅ **Lite SWR reference counting** - Cleans up when ALL components using a key unmount\n-   ✅ **Event listeners removed** - Cross-tab sync listeners auto-cleanup\n-   ✅ **Memory efficient** - Map-based storage with garbage collection\n\n### **What Gets Cleaned Up**\n\n| Type           | Lite SWR Cleanup      | localStorage Cleanup         |\n| -------------- | --------------------- | ---------------------------- |\n| `\"user-data\"`  | ✅ Auto (memory only) | ❌ N/A                       |\n| `\"@user-data\"` | ✅ Memory cache only  | ❌ Stays until manual delete |\n\n### **Manual Cleanup**\n\n```tsx\nimport { sharedStateUtils } from \"@stackoverprof/use-shared-state\";\n\n// Clear specific keys\nsharedStateUtils.delete(\"temp-data\"); // Memory only\nsharedStateUtils.delete(\"@user-session\"); // Memory + localStorage\n\n// Clear all (with/without persistent)\nsharedStateUtils.clear(false); // Memory only\nsharedStateUtils.clear(true); // Memory + localStorage\n\n// Route cleanup\nuseEffect(\n    () => () => {\n        sharedStateUtils.delete(\"dashboard-filters\");\n    },\n    []\n);\n```\n\n## Utility Functions\n\nThe library provides debugging utilities via `sharedStateUtils`:\n\n```tsx\nimport { sharedStateUtils } from \"@stackoverprof/use-shared-state\";\n\n// Get all current keys\nconsole.log(sharedStateUtils.getKeys());\n\n// Get current state size\nconsole.log(sharedStateUtils.getSize());\n\n// Clear all state (optionally including persistent)\nsharedStateUtils.clear(true);\n\n// Delete specific key\nsharedStateUtils.delete(\"some-key\");\n\n// Get all persistent keys\nconsole.log(sharedStateUtils.getPersistentKeys());\n```\n\n## Requirements\n\n-   React >= 16.8.0\n\n## Examples\n\n### Basic Counter\n\n```tsx\nimport useSharedState from \"@stackoverprof/use-shared-state\";\n\nfunction Counter() {\n    const [count, setCount] = useSharedState(\"counter\", 0);\n\n    return (\n        <div>\n            <p>Count: {count}</p>\n            <button onClick={() => setCount(count + 1)}>Increment</button>\n        </div>\n    );\n}\n```\n\n### Shopping Cart with Persistence\n\n```tsx\ninterface CartItem {\n    id: string;\n    name: string;\n    price: number;\n    quantity: number;\n}\n\nfunction ProductList() {\n    const [cartItems, setCartItems] = useSharedState<CartItem[]>(\n        \"@cart-items\",\n        []\n    );\n\n    const addToCart = (product: CartItem) => {\n        setCartItems((prev) => {\n            const existing = prev?.find((item) => item.id === product.id);\n            if (existing) {\n                return (\n                    prev?.map((item) =>\n                        item.id === product.id\n                            ? { ...item, quantity: item.quantity + 1 }\n                            : item\n                    ) || []\n                );\n            }\n            return [...(prev || []), { ...product, quantity: 1 }];\n        });\n    };\n\n    return <div>{/* Product list */}</div>;\n}\n\nfunction CartSummary() {\n    const [cartItems] = useSharedState<CartItem[]>(\"@cart-items\", []);\n\n    const total =\n        cartItems?.reduce((sum, item) => sum + item.price * item.quantity, 0) ||\n        0;\n\n    return (\n        <div>\n            <h3>Cart ({cartItems?.length || 0} items)</h3>\n            <p>Total: ${total.toFixed(2)}</p>\n        </div>\n    );\n}\n```\n\n### Cross-Component Form State\n\n```tsx\ninterface FormData {\n    name: string;\n    email: string;\n    preferences: string[];\n}\n\nfunction Step1() {\n    const [formData, setFormData] = useSharedState<FormData>(\"@form-data\", {\n        name: \"\",\n        email: \"\",\n        preferences: [],\n    });\n\n    return (\n        <div>\n            <input\n                value={formData?.name || \"\"}\n                onChange={(e) =>\n                    setFormData((prev) => ({\n                        ...prev!,\n                        name: e.target.value,\n                    }))\n                }\n                placeholder=\"Name\"\n            />\n        </div>\n    );\n}\n\nfunction Step2() {\n    const [formData, setFormData] = useSharedState<FormData>(\"@form-data\");\n\n    return (\n        <div>\n            <p>Hello, {formData?.name}!</p>\n            <input\n                value={formData?.email || \"\"}\n                onChange={(e) =>\n                    setFormData((prev) => ({\n                        ...prev!,\n                        email: e.target.value,\n                    }))\n                }\n                placeholder=\"Email\"\n            />\n        </div>\n    );\n}\n```\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","readmeFilename":"README.md"}