{"_id":"pretty-good-state","_rev":"19-204e7ed9d08b14da1597ffb94e6431da","name":"pretty-good-state","dist-tags":{"latest":"2.2.2"},"versions":{"1.0.0":{"name":"pretty-good-state","version":"1.0.0","_id":"pretty-good-state@1.0.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"dist":{"shasum":"01418f17153a4f27e7c6e35a41771c67954e7f82","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.0.0.tgz","fileCount":12,"integrity":"sha512-CgXf6jHJQOKD6b4E0GwS8jfcQLYcLM04ieeyJHlJS10+FZS3ULFPtXeXzz0EF5jX2aeIG6nmQbtGzCh9pXwgCw==","signatures":[{"sig":"MEUCIB4RYn88L/LzAUzjeyvgCwwTxqx6pPzeTWeq5dsP0wHQAiEAwk7EXZQvEJicNxQGF+eDqPfafk95Y/f4wA1l2dIwAww=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7588},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"53ea077b10e72e5a9a18dccd5157c8769f20bb66","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"_npmVersion":"10.8.2","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.7.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.0.0_1749680231096_0.5288601625764515","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"pretty-good-state","version":"1.0.1","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.0.1","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"2cdf457f43c98e4cb6e54599c096cd1282f11792","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.0.1.tgz","fileCount":7,"integrity":"sha512-7ccOKzuhZqNxXmxtNgGqApXgCHP1pnNlDEQ0vBc4NADXLlaZotyrERiVmtusK8s+ed/u0ul9ueA96LBE8fM7AA==","signatures":[{"sig":"MEQCIGiXErrecUyeubuHDH/c0/HAtJgoxLTFKtN8lDj2jQDqAiAosbnahnVxQcpd7MfHm0QK7Fs0WYS1HXfv6KRFCsz32w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6681},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"05c81adca42451039fc36f94cd235c2416b8a928","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.7.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.0.1_1749706447568_0.6737561288065852","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"pretty-good-state","version":"1.0.2","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.0.2","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"fe2a982a8c778d6de1729c546e0cd189d6b6f1ad","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.0.2.tgz","fileCount":7,"integrity":"sha512-CRoxAzou7zc03kpzMCY3UWNjw/FD8BveiNyixKnA8Cr5V1Dpl8lW0Q7Wjgp/bJiZNknjnEgnkRr0szfuHLNEzw==","signatures":[{"sig":"MEUCIEUHDDI2SN2kEjA1ybpKjGYsuzqj/VfMsWYsQ5/ja2tGAiEA5lNClaz2H0mm286ymN5nAfaWdR0UugamGODGDDidrBA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7001},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"5029898abcc7e80944cdbafd3917d861794004bf","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.7.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.0.2_1749750995436_0.7087813971934456","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"pretty-good-state","version":"1.0.3","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.0.3","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"216bf3bd2dab7f98d2544ddab9ca2dd8725a59e6","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.0.3.tgz","fileCount":7,"integrity":"sha512-LudSh3mZaSouZc5NlWaNb6+yt9/r2quOXHtODT5aa5YK13QUnXmreCwsUr3FJR4qtABacQE8K6DmTkQm65C0oA==","signatures":[{"sig":"MEYCIQDuyK30+E2CjjH3Ii1/Uk8tkFG0SuwTJyMB7pKYZfcxAgIhALVME/E7tyoU4qm7azIfnmywJ0hgDBezQ7N5VS8AR0Sm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7972},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"44c5b96da73a50327da7b85d44965b64c869b387","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.7.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.0.3_1749777549852_0.9656828208028729","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"pretty-good-state","version":"1.0.4","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.0.4","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"ec4a27f5836b069af2c723da60e0f4bb6441e4fe","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.0.4.tgz","fileCount":7,"integrity":"sha512-L+XP/tQig+rAeHNBekv6UGySGliR7Ht16+3AVhB1JUFWhxcQkQKe3l4DLHb84L8Imm4hbwMwI4KKpw93eNf7MA==","signatures":[{"sig":"MEYCIQDhLacyZAb7ewJBlTezqxMyQR+5rAv+FtEV/3K+K9WMXQIhAKgUwBOb5DISzPfzKYN8t9hfDnglcggC+SRR0Kab324Q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8570},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"c7c0630d21d450021862acdc18c00589b1f1dbb7","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","actor":{"name":"dvtng","type":"user","email":"tang.ddt@gmail.com"},"email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.8.2","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.7.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.0.4_1751005030388_0.23244286435543549","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"pretty-good-state","version":"1.1.0","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.1.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"f282c56e944286e1344012fd5993b9a3ee9025eb","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.1.0.tgz","fileCount":7,"integrity":"sha512-OjDrwOQcjBj8JwI3wjMb//jc5jSAUCI0HMUvjThM167xUByGwLPzeP0Hb/x+KyetpHHHiPQOx58i1OOvr2dXnQ==","signatures":[{"sig":"MEUCIQDkybSIvfdN5mw9TK8N6t0VgII9NRriFxnrRIMZv75ykAIgWxfHpWCVCiT+Jl0yNmHxlw/tLuy+w+en2c4hPsrUazE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8912},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"aab25272e53774a2d08df92409f5aef530885bf2","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.1.0_1759526457087_0.8158124627493466","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"pretty-good-state","version":"1.1.1","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.1.1","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"bbfd00fe55d060f44ccc3c24d3cf4842d0917e57","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.1.1.tgz","fileCount":7,"integrity":"sha512-SSFDQVEN5IrNeSVENzoAuTl270at1ibbopTrIBCLGFzUxElXwReGqgmAUAxBYVuSzCSU+KOD9gufNUkRyxh54A==","signatures":[{"sig":"MEQCIGadItuSH326x5/7d3mfwlEZjlQkxxIah7alCYfhBaSqAiA4ownnw+9WDY6fYGfL+pyA5KSGLyo11Bapl2ZA8+KiWg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9276},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"f5354e9befc0ae9368eaf88fa8e21a28d905bcfb","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.1.1_1759526922970_0.8888769466632476","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"pretty-good-state","version":"1.2.0","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.2.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"8b0f5c07cd7f6262ea34ae0481d7b15604d4d283","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.2.0.tgz","fileCount":7,"integrity":"sha512-bDGePHJFnvdqS/WvJn6SykMbAHEZIzqCkKlzWKACsiywhJ/VHo2bJF4TEbGtgyoCp6+eWXrxf6Uls+xT+SDdyA==","signatures":[{"sig":"MEYCIQD4XuM0hEqanSI4rvzv9SIS/s6TEGH95c8ChRZsHscK1wIhAOLORUDVZ/Q4aglrm/WV7O7bdA6IGLqoFY3VGn10BwJX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12345},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"d9ded7b303edefbe132d82b27f4c99306ea4cc8d","scripts":{"build":"tsc","prepublishOnly":"bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.2.0_1759710378037_0.1347022944995011","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"pretty-good-state","version":"1.3.0","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@1.3.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"978adacb18fd5ce3c5771fc7172ff739691bfd48","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-1.3.0.tgz","fileCount":15,"integrity":"sha512-aXk9q64Jrx0NOxHT6kJfm/MW4JHCCbKIXP0/qjKAXTUPNpftSWlSx6GEzHlbIekHEhNKyhTJGfEDY84gnZ6sVQ==","signatures":[{"sig":"MEQCIAt5q323fyIcihJgwqMzjAZVJAH/48ybqryZ0TuyRjHuAiA8i5/tbkr+aDaVcxOM8qZlplgOPapalH+HsnjVacuIiQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19702},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"4609b469501b8396dd214fa01c4a52cc6acfc64c","scripts":{"build":"tsc","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of `valtio`.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_1.3.0_1760714734177_0.1340849935114945","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"pretty-good-state","version":"2.0.0","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.0.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"f7871f87b922fb0e8e7dc1aa903052844bbc981a","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.0.0.tgz","fileCount":15,"integrity":"sha512-Pp+1jQ46SR19pzw7ank5smvBk2+ewAxFGELpdPxpnuWtf7FCwDZaQ6spoiI/y8NM6rfZbfKpKvndM3tgEAagJg==","signatures":[{"sig":"MEUCIGNUlMO9YAYHdnqywfIk48M8hz0uMzqe0B3+6X7wPXcRAiEA++B8C/tknG1NKug/UNyjaN7wtvZFReCj8gHBY3twMVI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18935},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"0b512edf78d582c51cec80f41198010b491b38ae","scripts":{"build":"tsc","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.0.0_1760763755395_0.4782026356648412","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"pretty-good-state","version":"2.0.1","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.0.1","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"0061b0eb8594bd07d3d2605faeface1bd4d458bc","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.0.1.tgz","fileCount":9,"integrity":"sha512-sz801cuUbfKwHIozGcITVi5LdGn5lmox4dGfHuy1WxoaEf1i4fa/DFHkXrPG2ajH8bCRi3fHHbYz1VB/GXvPcA==","signatures":[{"sig":"MEUCIQDKzVX/0hbjSpWARTVWZl/HNUzg3lkARzZVYD0Rh7+A7QIgLgoOkJosG2FNCCjUI3/+z2NghUjlJNj1CxPwox06cbU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16169},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"b5faad8f352108d77e20d5224cc9acc0c5603fbe","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.0.1_1761071224792_0.7112142511737292","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"pretty-good-state","version":"2.0.2","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.0.2","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"18facaaadae03eb64059f9d99f1a4fe5d3678c1e","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.0.2.tgz","fileCount":9,"integrity":"sha512-CBKvl0SkX3nm8mG6tEHFTLQsvW52X3rnZkfUbN9VQAeyIZrpGFNO95ZqerqA7X8yC2+WczIVJdUEKslsOKtrsQ==","signatures":[{"sig":"MEQCIHrpFKVAJxaVtZk5pyuKKMyFtCYJq0/teIi8RGTcnTbrAiAHk3tKBiNXY2I44WeJ+5v8HH0u9fyGSKhSMBpCratsaA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16187},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"d521a270c495b4c3ec88fb658c3ed6d0f818478d","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.0.2_1761107166357_0.45581351285533","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"pretty-good-state","version":"2.0.3","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.0.3","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"8a397f7933940c10bdf1eb136d5007630797ab25","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.0.3.tgz","fileCount":9,"integrity":"sha512-UudBpR8LdZNMkJOqmXQFo+ekPHfjy/swNwrucS0nr7vUbmITH3/3pLSW0BHYwuZTNwzE+ZKQgaxQZp6AET1iUg==","signatures":[{"sig":"MEUCIE3sl5VH+kxSDIrFG204D+0B53CeHPzxM/E6B6cFe+R3AiEA5O2KTH7jgbX9GumESx9XJZV9ORYoykAS16JbABs7WuI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16310},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"c98adb49e1e7f98a0c672aeecd79fb607a056e08","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.0.3_1761152572383_0.30455764163385135","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"pretty-good-state","version":"2.1.0","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.1.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"9bdc1e6fda5cc20ec450f8ab19595356997fa2d0","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.1.0.tgz","fileCount":9,"integrity":"sha512-z4duxuPp4EPTNNtskzbf2qX/tWRONd0XLDpAySgkrR+/5BSLbfSbvT3WbtjaiJLdafG9SGOiQB3UAUiyoQ3qnA==","signatures":[{"sig":"MEUCIQCqs+9kRWDLN2yYZ7wPB5GCZeoWwv/v3CXihLjr6xfMQgIgc11hn0Kq2u9VrhWHueFicZZwJzCkvyXFVX3YC5R98Vw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15329},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"4d61c366eaa92131224ce98c453a3067a05e86f7","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.1.0_1761176103460_0.5254156140002353","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"pretty-good-state","version":"2.1.1","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.1.1","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"fc3123d55adb79e5aebc10964c634511b53d4551","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.1.1.tgz","fileCount":9,"integrity":"sha512-qopcVALu44WFmxT2N8RbH3BFSv3RQm2PInnNiZUiXWraD3KLK+N2przKzUpHIkUt6CJlls/CHplmsuywn6EQKg==","signatures":[{"sig":"MEUCIEnxRaD7+M1JXg9x1DXaY9G0EOTTq5eVruHijmIebzepAiEAlVxRz2s2QjH2u52lBqDoBBWw50pTq6nsbciIKi5sMwk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15404},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"bd9f873fbbe07d397ea1b362f9665c83534670e4","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","prepublishOnly":"bun test && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.1.1_1761176747516_0.19509068230351367","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"pretty-good-state","version":"2.1.2","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.1.2","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"7c9c5a1e41d523998ae861304a82f9b50617dead","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.1.2.tgz","fileCount":9,"integrity":"sha512-w3/nEyjqJsnFgqUiWuXqWiqBSXHGP1irTOa9dnq4nr9tCnMoNd7kcrIzIKw0aZT0BKMxlsL/UH4p2Lb1ztoFxQ==","signatures":[{"sig":"MEQCIGQMtI+87lJM3gTSZ0Kba5qxUHKaSTPgpSOmVMRh9T1vAiBk1zpAyV5prAy+fHkcY+ln9aDrjIyPJbHwGGow3+5FRA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15684},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"225ec2f90b6080ac4491b1d2280a6d052e672632","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"bun test && bun run clean && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.1.2_1761247506782_0.0564267669813443","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"pretty-good-state","version":"2.2.0","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.2.0","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"9ce5311c65ba1e8e62b4ba6cb60183be878e0df4","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.2.0.tgz","fileCount":9,"integrity":"sha512-Q83yXDI4Q6oYnepmAM5Q//WkfN4rwoEL83Jxrrzw/lE563pVMz7auXx3DfesIb+A69uXhgmYUyvzquN+Lf4y8w==","signatures":[{"sig":"MEUCID1SVPlJgPOc+cDediB2L0YcoZAIFCcqKy0VxkPrnj1QAiEA2n0Sq3B2wz/87uyPG8NThbw6LKknHA4Yv2uSTASzf0g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15910},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"0e6b7caed5145c2a73d5455e0ebecd76536c4211","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"bun test && bun run clean && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.2.0_1761337440863_0.21990872828473162","host":"s3://npm-registry-packages-npm-production"}},"2.2.1":{"name":"pretty-good-state","version":"2.2.1","keywords":["react","state","valtio"],"author":{"name":"David Tang"},"license":"MIT","_id":"pretty-good-state@2.2.1","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"homepage":"https://github.com/dvtng/pretty-good-state#readme","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"dist":{"shasum":"670f267a8e1dafcc6331eb7baee69c56187fb744","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.2.1.tgz","fileCount":9,"integrity":"sha512-BaENxiolY10HzvjB3pXBCc6bXJAntMUm+PMLT5ifr64ANvprD48LZz4HvoD9r6GpclRW/tdRPKtViyILtz6izA==","signatures":[{"sig":"MEUCIAeKN58VMajXVUviNHFF8pqhz2h1QEC+qFAOrszQpaveAiEAp5HQMLWiqGb39/o/S+b8lI1D5rZtnFanHLUqv/HFHgw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16234},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"ef8444f68579954d61f90dc3af7ab6aee48587cf","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"bun test && bun run clean && bun run build"},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"repository":{"url":"git+https://github.com/dvtng/pretty-good-state.git","type":"git"},"_npmVersion":"10.9.0","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","directories":{},"_nodeVersion":"22.12.0","dependencies":{"valtio":"^2.1.8"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@types/react":"^19.0.0","@testing-library/dom":"^10.4.0","@testing-library/react":"^16.2.0","@testing-library/jest-dom":"^6.6.3","@happy-dom/global-registrator":"^17.1.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"_npmOperationalInternal":{"tmp":"tmp/pretty-good-state_2.2.1_1761416899630_0.7435266094594766","host":"s3://npm-registry-packages-npm-production"}},"2.2.2":{"name":"pretty-good-state","version":"2.2.2","main":"dist/index.js","module":"dist/index.js","type":"module","types":"dist/index.d.ts","license":"MIT","author":{"name":"David Tang"},"keywords":["react","state","valtio"],"repository":{"type":"git","url":"git+https://github.com/dvtng/pretty-good-state.git"},"scripts":{"clean":"rm -rf dist","build":"tsc -p tsconfig.build.json","prepublishOnly":"bun test && bun run clean && bun run build"},"devDependencies":{"@happy-dom/global-registrator":"^17.1.0","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.2.0","@types/bun":"latest","@types/react":"^19.0.0"},"peerDependencies":{"react":">=18.0.0 <20.0.0","typescript":"^5.6.3"},"dependencies":{"valtio":"^2.1.8"},"_id":"pretty-good-state@2.2.2","gitHead":"a72f722f2a48b6d5afd209793a8e97a03e26ef70","description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"homepage":"https://github.com/dvtng/pretty-good-state#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Te+ltSagiDGojU1dONCFxjckFHmeuzxoYMD5fvoikESteKJqsOYA7Yy+Cs2hla+AoFQIHWF8oAC4VIA7xY8raA==","shasum":"9832ddbade2058a706476c737f64572a9049a767","tarball":"https://registry.npmjs.org/pretty-good-state/-/pretty-good-state-2.2.2.tgz","fileCount":9,"unpackedSize":16497,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDCHENHIk/nKlcPveAU35zg54nmXjuB9OXO0glreVlhtAiB/sjfFKy0EFMOEa0QjoDKVaM7MJIxzKt3ZqU4LNCSQdw=="}]},"_npmUser":{"name":"dvtng","email":"tang.ddt@gmail.com"},"directories":{},"maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pretty-good-state_2.2.2_1761793346728_0.08440902729452437"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-11T22:17:11.095Z","modified":"2025-10-30T03:02:27.206Z","1.0.0":"2025-06-11T22:17:11.371Z","1.0.1":"2025-06-12T05:34:07.732Z","1.0.2":"2025-06-12T17:56:35.618Z","1.0.3":"2025-06-13T01:19:10.031Z","1.0.4":"2025-06-27T06:17:10.549Z","1.1.0":"2025-10-03T21:20:57.291Z","1.1.1":"2025-10-03T21:28:43.154Z","1.2.0":"2025-10-06T00:26:18.277Z","1.3.0":"2025-10-17T15:25:34.354Z","2.0.0":"2025-10-18T05:02:35.598Z","2.0.1":"2025-10-21T18:27:04.985Z","2.0.2":"2025-10-22T04:26:06.541Z","2.0.3":"2025-10-22T17:02:52.597Z","2.1.0":"2025-10-22T23:35:03.694Z","2.1.1":"2025-10-22T23:45:47.727Z","2.1.2":"2025-10-23T19:25:06.963Z","2.2.0":"2025-10-24T20:24:01.134Z","2.2.1":"2025-10-25T18:28:19.827Z","2.2.2":"2025-10-30T03:02:26.986Z"},"bugs":{"url":"https://github.com/dvtng/pretty-good-state/issues"},"author":{"name":"David Tang"},"license":"MIT","homepage":"https://github.com/dvtng/pretty-good-state#readme","keywords":["react","state","valtio"],"repository":{"type":"git","url":"git+https://github.com/dvtng/pretty-good-state.git"},"description":"A just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).","maintainers":[{"name":"dvtng","email":"tang.ddt@gmail.com"}],"readme":"# pretty-good-state\n\nA just-enough state management library for React. Built on top of [valtio](https://github.com/pmndrs/valtio).\n\n```bash\nnpm install pretty-good-state\n```\n\n✅ Fine-grained reactivity\n\n✅ Simple and intuitive mutations\n\n✅ Unified API for local, global, and context state\n\n✅ Full TypeScript support\n\n## Usage\n\n### Creating State\n\nUse the `defineState()` function to create reusable state:\n\n```tsx\nimport { defineState } from \"pretty-good-state\";\n\nconst CounterState = defineState({\n  count: 0,\n});\n```\n\nYou can also define methods on the state that directly mutate it:\n\n```tsx\nconst CounterState = defineState({\n  count: 0,\n  increment(amount = 1) {\n    // `this` is bound to the state\n    this.count += amount;\n  },\n});\n```\n\n### Local State\n\nUse `useLocalState()` to initialize component-local state:\n\n```tsx\nimport { useLocalState } from \"pretty-good-state\";\n\nfunction Counter() {\n  const counter = useLocalState(CounterState);\n\n  return (\n    <div>\n      <p>Count: {counter.count}</p>\n      <button onClick={counter.increment}>Increment</button>\n    </div>\n  );\n}\n```\n\nYou can also configure the initial state:\n\n```tsx\nconst counter = useLocalState(CounterState, (state) => {\n  state.count = 10;\n});\n```\n\n### Shared State\n\nUse `useProvidedState()` with a `Provider` to share state for a portion\nof your React tree:\n\n```tsx\nimport { useProvidedState } from \"pretty-good-state\";\n\nfunction Counter() {\n  const counter = useProvidedState(CounterState);\n\n  return (\n    <div>\n      <p>Count: {counter.count}</p>\n      <button onClick={counter.increment}>Increment</button>\n    </div>\n  );\n}\n\nfunction Page() {\n  return (\n    <CounterState.Provider>\n      {/* The following counters will share the same state */}\n      <Counter />\n      <Counter />\n    </CounterState.Provider>\n  );\n}\n```\n\nYou can also call `useProvidedState()` without a Provider, in which case it will\nuse a shared global state.\n\nIf you pass a state object to the Provider, it will use that state object\ninstead of creating a new one. This is useful when you want to access the state\nin the same component that renders the Provider:\n\n```tsx\nimport { useLocalState } from \"pretty-good-state\";\n\nfunction Page() {\n  const counter = useLocalState(CounterState);\n\n  return (\n    <CounterState.Provider state={counter}>\n      <Counter />\n      <button onClick={() => counter.increment(10)}>Increment 10</button>\n    </CounterState.Provider>\n  );\n}\n```\n\n### Mutating State\n\nIn addition to defining state methods, you can also directly modify the state in\ncomponents:\n\n```tsx\nimport { useLocalState } from \"pretty-good-state\";\n\nconst counter = useLocalState(CounterState);\n\n<button onClick={() => (counter.count = 0)}>Reset</button>;\n```\n\nThe library detects mutations and re-renders the components that depend on those\nexact changes.\n\n### Passing State to Child Components\n\nYou can directly pass state to child components:\n\n```tsx\nimport { defineState, useLocalState } from \"pretty-good-state\";\n\nconst TodoListState = defineState({\n  items: [] as Todo[],\n});\n\ntype Todo = {\n  id: string;\n  text: string;\n  done: boolean;\n};\n\nfunction TodoList() {\n  const todoList = useLocalState(TodoListState);\n  return (\n    <div>\n      {todoList.items.map((todo) => (\n        <TodoItem key={todo.id} todo={todo} />\n      ))}\n    </div>\n  );\n}\n\nfunction TodoItem({ todo }: { todo: Todo }) {\n  return (\n    <div>\n      <input\n        type=\"checkbox\"\n        checked={todo.done}\n        onChange={() => {\n          todo.done = !todo.done;\n        }}\n      />\n      <span>{todo.text}</span>\n    </div>\n  );\n}\n```\n\nHowever, note that the hook `useLocalState()` is in the parent component,\nand as a result the parent is tracking changes to all state properties accessed\nin the child. The parent re-renders unnecessarily when, for example, `todo.done`\nis toggled.\n\nTo optimize this, we can use the `usePassedState()` hook to allow the child\ncomponent to track its own state:\n\n```tsx\nimport { usePassedState } from \"pretty-good-state\";\n\nfunction TodoItem({ todo: _todo }: { todo: Todo }) {\n  const todo = usePassedState(_todo);\n  return (\n    <div>\n      <input\n        type=\"checkbox\"\n        checked={todo.done}\n        onChange={() => {\n          todo.done = !todo.done;\n        }}\n      />\n      <span>{todo.text}</span>\n    </div>\n  );\n}\n```\n\nNotice how we rename `todo` to `_todo` as we destructure the component props.\nThis helps to avoid accidental reads from the parent's copy of the state.\n\n### Accessing Global State Outside of a Component\n\nThe `globalStore` object lets you access global state outside of a component:\n\n```tsx\nimport { globalStore } from \"pretty-good-state\";\n\nconst counter = globalStore.getState(CounterState);\ncounter.increment();\n```\n\n### Accessing Hooks in State\n\nThere may be cases where you want to have access to hooks from within a state.\nThe `runInComponent()` function lets you do this.\n\n```tsx\nimport { defineState, runInComponent } from \"pretty-good-state\";\n\nconst EmailFormState = defineState({\n  getIntl: runInComponent(() => {\n    return useIntl();\n  }),\n  email: \"\",\n  errorMessage: \"\",\n  validate() {\n    if (!this.email) {\n      this.errorMessage = this.getIntl().format(\"Email is required\");\n      return false;\n    }\n    this.errorMessage = \"\";\n    return true;\n  },\n});\n```\n\nThese `runInComponent()` functions are called in the component where the local\nstate is created – i.e. when `useLocalState()` is called or when a Provider is\nrendered.\n\nNote that since `runInComponent()` requires a component context, it cannot be\nused in global state (i.e.\n`globalStore.getState(EmailFormState).validate()` will throw an error).\n\n### TypeScript Types\n\nYou can infer the types of the state from its constructor:\n\n```tsx\nimport { defineState, Infer } from \"pretty-good-state\";\n\nconst CounterState = defineState({\n  count: 0,\n});\n\ntype CounterShape = Infer<typeof CounterState>; // { count: number }\n```\n","readmeFilename":"README.md"}