{"_id":"use-location-state","_rev":"45-857c25033a76303770bb2ad7b4b41de1","name":"use-location-state","dist-tags":{"latest":"3.1.2"},"versions":{"0.0.1-alpha.2":{"name":"use-location-state","version":"0.0.1-alpha.2","description":"TODO","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://xiel@github.com/xiel/location-state.git"},"scripts":{"test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"a39465f7cc0f2d8a54944cdf4e70d7b3fa42a8f6","_id":"use-location-state@0.0.1-alpha.2","_nodeVersion":"11.10.1","_npmVersion":"lerna/3.13.3/node@v11.10.1+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-lMh9kvRGA/5qacP+1vGc1ziMq65XxNG2X85xO2uOlg3xja7PyPMas+ZJPwpOml+Vm97p70urCBaK2NetEKMr8w==","shasum":"928214bbe5552ee5a3f678d6814f939fd9898681","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-0.0.1-alpha.2.tgz","fileCount":4,"unpackedSize":1940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcu6H3CRA9TVsSAnZWagAAKmcP/R6VHwu2yJcO+sKtsViY\nr90hFsJUpvCkCDTV1iFUFpZtloiLGOg3/uJ8l0f4opHntMcdtlsiGaBVqwV4\n0DmqnIkhMfylAx2Lk7ykYvIM5MiQARq1zTEGbCRF5mi/wxRRUU54qiPV2YRq\nXz52KA0QMY1v3JYXwZVsZLkVlLz6xYhOGDJ4UL5VlkTUtZRosIQmfS7BR5l3\nlVx7ZVz3RqvS+95AM7rxqpDSiXATcs3i3v1rYJ5ny8XxF9RBWy9iUzRW58JL\nf27ME1/VIoHGCNXD4HSmRTXBU70fPaipL5MsQaGBRXyI9cMTTnHSUKJKXOnB\nsCGvTioTRJDztrktTWhGtppJALPQwnhqJIFhD9DgLx1pF3+eQj2T8RMv68hH\n99eI8hRlE3DXCimx+8utF5ikKLhW/DWF8AP3IBsRHcAnt+1pVFL8U8bBM2CK\nwMNIErhCCuIMurYAbZnAlR9Ah382PEtHTMs7eBxdcQO87VKQwOLJAu1DNNxK\nkCO3oBlWhkS0bOi+mf/GjFjqvKCNFBLISxhkyQ4rlJBqxIpZu3SF6trTz58u\nYABGLzzUzdMgFo/FwVfUF1HsTVwawEHWGy561hRotuJa/EuwXi7x4aLrwEhW\ns6wdGAWf7wZAjmZJ2+lAgU8qA4o+iyvMjtqZ+0uA/zEl5X3cRRybZBFPA9wA\nRMH/\r\n=djqS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA22B4Bp4Z3klIKipEUHNEffpfsT/l0RXdeYKFR2SFMgAiEAhGNkt8cMchSjZ62s3vP+EFSdxx6xv0AEVCK4RUVkZDM="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_0.0.1-alpha.2_1555800566385_0.2688326261809204"},"_hasShrinkwrap":false},"0.0.1-alpha.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location (query) state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^0.0.1-alpha.1"},"version":"0.0.1-alpha.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.20.1","tslib":"^1.9.3","typescript":"^3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1","pretest":"npm run build"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"39be13e2ec98c69ac4703b3bee2bc9196a0df55d","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@0.0.1-alpha.1","_nodeVersion":"11.10.1","_npmVersion":"lerna/3.13.3/node@v11.10.1+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-oC3UcgOD9vTngBdyXVvQ5xYup8UUgy200E7lgXNbJh3iaybss3LQmXW5wubUK3g0yJmLBo5fIgzONZ5KTfKFjA==","shasum":"ebe6bb6a6eb1b25053f5f578850c4b4ea1f53617","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-0.0.1-alpha.1.tgz","fileCount":6,"unpackedSize":13715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvC7iCRA9TVsSAnZWagAAdhEQAJqg3ELxps3g0dDE0ap1\nI++cA2MWj7lz432Y0ADVUj4QpaVbHW/vojJy1yqRjFfqM4nnnAok76ELAK4n\nh1Rt+rR42LvvpljUpaScuFkMWHld5jlyptyIWaWXLLKIjkdP/YRfZUNP5Tj5\ny4Sl/OWM+RK+9/2mDbPo8YO67kFM1ghVoCllzWVt7swR6YFr/n2WzH4CZKLm\nmg+6Jb5b3HFnkHwYF26eoPVD6UIf/41Idheg8iJs7L33hLzwUysbZ+z2j3SR\nxWqasewhJpjHuln29QeLHI5Ul/BfWUDD4hwVFtJ92QAlgj7jtIRoM+CpR3Tf\n0pa1cAd0+1TawNpJ2N++hg05OzgY1lt+/lKkXqMepjVEhLljuaQcU0gymkoe\n2c9O6qAhNrjqewP/xrZA1NRLpMskLn62GuzzI6YJzLUP8ICfyC65GFgLLEyU\nYtXRCrQ54e94VlBhK83tpFeetFrx7It+E0m5uPlPMMW7uO6MBODcimEBlKOs\nO3VAxfDL0GwZ9g2F2t1qrNECr8uqwT1q3cWgFRrTuCCcUzPbW7s+bVf5VIFh\nIyYKx+6Lf28SOQ5YfY7cGE0d3q0fZdBf6j89WPZjOWexv1F6KxWo5i7LT5Ua\nAFI9p/D6l+nrLaA4eBC4KRzQbFEmlRa8T++pLYm8LUAp/CUp97XCC33AkdO8\nrK+2\r\n=oRCl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqHAGOPnoBg+ZYHj3v/IkV/yEKLaLlX19L2QRXz5TvHQIhALqAQTaun4E5IN6Zt5M957Pg2tlZ52Ja2UAWxEFTuUfo"}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_0.0.1-alpha.1_1555836641772_0.40640343530278233"},"_hasShrinkwrap":false},"0.1.2":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location (query) state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^0.1.2"},"version":"0.1.2","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.20.1","tslib":"^1.9.3","typescript":"^3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"6c5ba17c62a412878c04f0f2a54183f5e8057120","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@0.1.2","_nodeVersion":"11.10.1","_npmVersion":"lerna/3.13.3/node@v11.10.1+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-nb5JqnCPxs7bbwllIb2ELuYQNxxcxICS8Nu21XI8Vsna2Su5g7Jwo4pGNitIwGkb875rOhRULFgNSGhdfogtMQ==","shasum":"cd23631a8aee39972a246bbcca18c4ee9bfd0f36","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-0.1.2.tgz","fileCount":7,"unpackedSize":14143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvOxWCRA9TVsSAnZWagAAKhkP/jdrpi3lztWF/CVpOIZ/\nvxVi07q1lB0K3MY+KpiYSg7apZJ6JbBW4b4vUybjD3ZwhOhn1dYbdT9/x8aN\n9WPjqnoio9dtBY+NyaQgdPrIQ/FieTLpbOLHNL32nTyLuG2U4WwEkmaLKQGf\n88/dsJGR6YM+D+txO4HHxBDXe5I0iU7BHcw8rp0SfwU/U+ai4sICqkAi0U39\n1pqOJvtqtrOdpDVtrp4nOIkc7/7EAyw4/0Om7r8YKDsodAtqM1fDDcB0VZsX\nyTXYAana9Gv9qwjoOQY+RPkvXUIVTtrf2rsuFOlOVU4DgkgXd/VTKbhXjnkC\n+gMZQFY+8Xt/j1GxYhqECdFtJ6hVcxdPY/sS4bHhY1oAA2tOhc/OID/pYbEp\nLmM+6Wgbg8zHSHuNbswZqUey1RCYmQeKAuiVT5LTu1TOPMYs4FyZjagMAnPq\nvdzdREpO30BOhwRAf0P/EbAvfYRXioMRdhp7NZ3j4/nd2tzRyYODEmc87vJW\nbpuCb0Kit9e2eRWGmBvliqCiHZxFBlIyxU+5+olZYfo35fBXATKgmqcbJBe6\nYtrVCL2QciysIXTQ4/niNcmKIPFyUzD/CMSLBeKVCdoshJQ43nS1dtBQpzph\nOu8s6/NDcXMY1T8Ro72YI2Tth4rMMpFN0ccqYIvd7CmD5/E4LrjXDDEoWVhP\nlel3\r\n=raN2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnHdh55NeZM33S2EXWACNqk0cFOKO8dIF5Dt4HL0AvhQIgTUxoGKbJhvHks0lNqsWYJqAMA20rfQAKRQrizDUp+Ic="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_0.1.2_1555885142202_0.8962584485324308"},"_hasShrinkwrap":false},"1.0.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location (query) state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^1.0.0"},"version":"1.0.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.20.1","tslib":"^1.9.3","typescript":"^3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"c53250a114121cba28c0ed7bb2000f47a0153e54","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@1.0.0","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-S9iB9bwSStpn71RqfARrP3/f0SS0np90IgfeDJpF4o+11n6kTB29p7UVS94Y8MPYhwwhiYC//6lxsLcK2dtVYA==","shasum":"9dad42000ed6f5aeef680b03eb62755a12ed5d12","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-1.0.0.tgz","fileCount":9,"unpackedSize":17093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvyNMCRA9TVsSAnZWagAAPEcP+gKSlXJQfmpC6UrBnApP\n0vviUjN5agLEwFvMV7FD/BRxWFJPVtJ44lfgZYQeoG1a7aPd9A7xkZYsjESt\n15cqaXQuTeYXeZCP69CBoyuyxk3PmWQWGwZU8UDb9DZCU7WwiXX6nCo340tC\nepYZtdLM6A+AhMJDMEachEbyR1+gg7K55sZzEjQQQi4pUcdotRdPmaAX5QFa\nNPf/AMnQ+TIU3xqAOnzJagwcHkfMOrF4hmNbSVE1LgIQVK3OalEIzA9bdySb\nc70iX4HdkEg14Me9L7vvX8tXDXajhxKycR7wf4nQx+TeaIsACUlWMoHVYPHf\nNBgoBp7f8w/4VB94QQHIPUPNMsI2XicpsbmhW8u0mJBHfYKhMp8d1GhR/Ost\nKAw/dj0Uzrh/fcgcIxTP8ynqHPBT79eZZsoBVH1gdIkOzy1j3sJsIZhN9DzJ\nyQQw/JUDif35BxyKS3hxsyUpXAfFQ7cCe073Uyi6+p87y/Yr82uYUk7D+j6i\n54FWQPZW0lzONuEcD8BDo+A2FqYunvwHmYQ9O2gTNJbXFUcI6jPTFzCMgU8P\nzDBnxql8J9jRVg37EPb1Bej/4Nj96m2AgIUPiQDv+AxkSdGHzQAXrkOlSGSF\nuW4BdLDx1IGzVfBJQAP3oVjjggtLW0YWKFYln+jMgyN9VRSOOInguxmK+Esz\n75dR\r\n=MqtI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDY8DGfwBgRM7buWsYcKOgE4Iawcs8o5h4WOGPBtcBMrwIhALF3G5JcOTHMBsEUfXoVHkwIxkF7Sv+J19lCqb1lrEVK"}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_1.0.0_1556030283719_0.15928487021934656"},"_hasShrinkwrap":false},"1.0.2":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^1.0.0"},"version":"1.0.2","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.20.1","tslib":"^1.9.3","typescript":"^3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"c00fa16ba910ac38dad933c9129f58ff5c92aa22","_id":"use-location-state@1.0.2","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-RN49ojNrUgaub7Yy13eyoxq/BkXp0NFyS/dapI4BeLIvwP6JkRxWlMFQES7pQ54PFRVrZOBcN3+8He2Jdenpcw==","shasum":"d2531f9487f7268a1df23e24e1220893517f607d","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-1.0.2.tgz","fileCount":9,"unpackedSize":17091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvylMCRA9TVsSAnZWagAASLMP/jjsVGnN0CCVVPbvIfhP\nuPH8AYd2fwE/K7zkls5sI4XYK8hvXc8DQik+PCKLHqy0UUeqwBvffnSutgif\ndsjlZqEyzKMj/LphRvzbxuGTbmrT3l+5OmoJqs+whtP00NNhGCxAAjONPQoY\nIS+F3P8C3el1vU+MbSsfFBIymxFnqPbTKI7g2gezE/SvzSUlxsHhoYMkloBu\nQFQnSq6b2PTUe3QeFQtIbFOMyU8hNVqJtTpoONrcEPeBpIF/BbGakAy48C9P\nFk7CLGE/WAAKqUHssyCb5fEf6CU6g3SRaNbiQqr4jSCrQ7nTSkjJoQLNXSzQ\nogaUw+HyVhY7b4TRQe/zsuGn4EyAOUYl5VLaN9Z+cLoqsADhUSKjHzflPz9d\nyC0yugFX0ASt6ZVBV+X0aCxEz0b7OJtBnplGRheBIwoKIBCqoYsAr+cIbz8v\ntqctvalxfgOzyhrAV384Ao+CTIo3UUR/h3pUdwMrNOLG1PCgmqmdmlJpFbdy\nMqQ+oyGQaqBF+ss1slBHHnkKwg/lshOvwTDL7TAaS9yRKnfh2ZtbZdKaaZLT\nQzqrWZkbSyEvBJ8Thb/cwFt6S2sE1VIjE8jGKniPtR6y6Jz8rFskMecyKMIC\nJmX8ccMmr06waj/boT55u5PaRTNIFtIdns6azF6PtS+xZAODCLQQAxvda5MJ\ntgI4\r\n=8BEj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGyEW55UQIjIk/FuytdLuIKT+wsB7TYINQXONswyMbe8AiBPlw9z+5z6lm7OjBqZZm1Rh0WDbb5w5yJSDzp+UFWfKA=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_1.0.2_1556031819701_0.33284176624776696"},"_hasShrinkwrap":false},"2.0.0-beta.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.0-beta.1"},"version":"2.0.0-beta.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"9607235f6c9bde90efee62a7e22e74ef3f93d33d","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@2.0.0-beta.1","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-VgOabX0PiSMvPZ8BwdPclHBfsRqnpL/q2u13K2YnuEMj+qUQlPv6fsh1yHrfHd9Hnq1NnzTTrkFg+dRdxe+/wQ==","shasum":"fb61d1e8a606cc84958b1fc45f2020909ed0fa85","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.0-beta.1.tgz","fileCount":9,"unpackedSize":17110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwrFOCRA9TVsSAnZWagAAig4P/iVngRAJsQt1mCCIlJoo\nPwZ0iGV9HuPfttkeU3jpzsccTw8yrZzB/Bu82tai7DRGbkKNYfJaCzMgBf/G\nLsg73el3OyIhXaz4Lz76LSVSLVz5lBHFBPS5bQ10NvGMy0R3gO4GgIs9SQwm\nyFSpiJBDC802QP6k/L0RDCt2c8HGFdqX2ydSNQ5f7Tkk8yJywFCkNxTHbGWa\n7csZynK30Mub0TE2UhwmDXzOFDosih+8jdsH/S9grUxPSRs+LjOeVTtXi2/P\nkrKlj+NR5vH4w6/aOsNVjl8KP0dHnXd12WNGjYcAlZ46DZlbipVnMVoEKmLi\nOf8uNPiB+5/GBTqOX3zndCJEdqtvxMZYpcL9/F5KTGmaLTy4WG5vUYHEzFWA\nEa/InoORTPtCMSXolyJPtwK1gHFL4N5IlqalRxTb8RYt6LA7dYRRDnhaCsd/\negZqLpzHykhRod/YQo3GcUueSgH4Ri/x6zVJqzlecuG06h0it2hFLYB7QS2f\nEk7MAydb/Js3KvuqLDpb/eyvzxFX8Z041XO9a8tlH8B0A3cqWbZKy63X3XNb\n2/Pt7Fsxhdx8/CmxTAj+d3fT8XlgZ5OLWp9CGtDF7WSVlIrRiMLokeB3nBFu\nsGNZXne9oXhn30G/43LJg1Bh0Gnrd4yFNTVFIgVm5lEj69iBBAYaHmYubxmv\nLMdN\r\n=dMi9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbuJc+sXqdwv8VRzc3zKXWvZ8vsj0kaEb08gLvfP12FAiAW98W6CpgKTLXHpnruTg6buVP6/qT1QLMmBz3ps/OshA=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.0-beta.1_1556263245481_0.28539148970588757"},"_hasShrinkwrap":false},"2.0.0-beta.2":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.0-beta.2"},"version":"2.0.0-beta.2","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"5433bbc864a81231349fd3cedd292fcdaea982b0","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@2.0.0-beta.2","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-9IzU0SeidhbMl5tqSnwr/tNjyBVGY1jDk+rpa0Q2MusizLM69x1sKbl0SGnsnp5FoKRkiTkwD/ss0HzVDQU1Aw==","shasum":"f140abc657d2bdf3a0a1746994f8335434fe561b","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.0-beta.2.tgz","fileCount":14,"unpackedSize":17651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwrh+CRA9TVsSAnZWagAASPQP/0a7NUnrH7RrQG742OzN\nNIGwiIg2Ey01eosGbSxIIYnvs1lMvxrmOy8DUyqzTXQD9MvoXsgddWAZu7dC\nDPq07FFwRHqjxVA9gwNLZ5gPKw9Jf/3FPnuzpBbho3cdfLSDDvnTH0bKxTEs\n8a8VGrn1eHbBIM5NLLauiaJ1oeXKJuHS3QJzLz4PXcxc1bEqiBmedIq7rXHZ\nBlP7Xrw8ZM0xG5BvBbqmGKEtGkWh+tgg492cqIhidd44W3+4OXWBwcaLH/Tm\n7aQC9MfBlPqtnFpvqv8pvvi7tUpIur2u49K0SHRkqKbClO/0eXXxNtH3gkXa\n4ZK6SLVS+acV4TxQNz1N0LGxu0TWy/sbp8PBeTvgZASyJKMZOSu53ys9YHuw\n87S8gaGtoHfXJ5RklKrBhcJnZXNbgMUWK+AEpbDkdkRSfTLsL3RBm3h+AfUh\ninLzxSPq9b6ZtNwvyhVjGAJSzzJIh484WvM2i+aZz4V71IHb+e9xyBNHhw+Q\nB/ZcQY5nkXAmu/bZGzTIq1xO+trfo6BL4mMb+UJ7Ze5V1QKLMXm8rnAdeoFP\n8VrLGfceGUnIn0FhvotRU5iuiKDD+IW7Q6s0akUuYPHBze3GIau4dYBgjGzS\n2q53ZO24qv8zP8gq7Q6QloLMiK846EjxMQPelry44iG/BJn8/SyhwMTVePlQ\nT9Ow\r\n=6A5p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+fkzj6oUGWJP7XfPp/SWRmN5chu8hGwO3ul7aHv2LkwIhALrRv/aErqBGKr8VLRnLOt2ccCky0AbEWl46GB32ihna"}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.0-beta.2_1556265086105_0.6807359060024627"},"_hasShrinkwrap":false},"2.0.0-beta.3":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.0-beta.3"},"version":"2.0.0-beta.3","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"a64299bf54b6468a6dbda3e3ea0f49e6313679f6","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@2.0.0-beta.3","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-z+4CYQmQzaHynBwzqMzlPxTjWkU5bvLLt5wbjws5ftkoFB1GCbHDl7pd3jtNtMc16RtDjUJHNk4J1K1G8jJdQA==","shasum":"92905f58d972a1965ebbe61d860792f5dc584111","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.0-beta.3.tgz","fileCount":18,"unpackedSize":20016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxkR2CRA9TVsSAnZWagAAYxAP/jrZlt2GeICXA9Ejf41n\nrkqtOwf/qcnx3DYljtBUgzvK4dYyvbMURCzODbEWQbkmpqVSap/thstypsUp\nWa2eQIzi5leJx7fKj5ZhQEyiUkeDI9wPMDEgqJzvG3KXtRk9YTlM8jQWKF8Y\nrR9gl5kM0PltrYcBFNI6CMP0l9GT1RG3hEAns14dGUnJyDBDdjEGgRiPonG7\n77VFA9/Wv0OcCjdFNumFTjJKhLOPX0PCgXhyOGmQOwq0KUV43HVJXHwN55h3\nuzyg+xZ8Pm2BrxJcc8uz+B6SSfbgvuc5CLcWelSKC7A9odmbvdik5OENHzbM\nYvH9W4FsGc3cyStyFexzjOS4MNLNc6fhsjPaGeFi03eJybrFfu9vfa0S7d3a\nRN7gzszmCPdgt/rIPR00RgwK94YIEJpVpYlSFJ87ZsTKfZGnaLIGQKon5gzs\nzF2UaWnI37GbQByeX7LIvFOdMni0JJEgHfZKzQXQMKIjBdhb9BSDvUvQaJW9\nCctzcQx0Sw+7pBSEaF3zFtcQ+F0/iwk4v/jcv/Q9AXQh1V0KqDQwE65B0kzX\nEGsZUoNqoudUWWHdT/TfdFfJGLIiLJNkeItgoZILRlDPvrnx0tIqu/cqzE1B\nQo3sSDcq1nU5ipxGGxKMgBdKc/KHpnnGQGWNC6+vw8czdKtFATFlbMJUkrtB\nMC84\r\n=5vko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKP8BzP4Ldiqcw+mouSH4b0/MfpD1mjpQZZatuXhYzFQIgYWze/i6guj+nu+pI58WBSP2kKI2fGMK5ydbJFFoYQSg="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.0-beta.3_1556497525477_0.16719721574508983"},"_hasShrinkwrap":false},"2.0.0-beta.4":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.0-beta.4"},"version":"2.0.0-beta.4","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"c9ace82290f32f37ecd3664ca62f2648029d29a8","readme":"> TODO: coming soon\n","readmeFilename":"README.md","_id":"use-location-state@2.0.0-beta.4","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-lIrrErsbt1ljFjGw6bWx35trWD56yxob5nYghENRf8Lz76BNjMsQSYAvHJYU5D6tNmMftJHbykEfDjCJoPRfjQ==","shasum":"73453a65d81267c172a15e798d5519d2b0daa1da","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.0-beta.4.tgz","fileCount":20,"unpackedSize":21129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxucSCRA9TVsSAnZWagAAjGIQAIpL9+Qyl109dPh+gIfp\nr7MH5So87L1xzuhi7yKTTx6rFf94QHZQ1EvpvMnIPgdKgCkZn/FWyTRyTdjT\n2d3n7OSE3wP7c5PwRTJTtXwfxhfu8Iv5ETcdQP1u4VFgV+hCqEzIWf2Xxqys\nP6zMHOslYVZ0o6CbQ7DHbWVmWAjWqvajLfaxpqZKeKhHm+rQGpsjBDtew9U2\nt7RjTFBFbWKH4PZ6yqxnmJw7PpY8DoqSbuKzNFKFWqI1oUsWgOPOWtbJZNw+\n7oEREVfvMful9DfRat9U2cClv4DNFPQnFp4ObujDdug3sbKMRODSpgE/3O0e\nBr+ocIgaefDiUeV9MTVs1i747uf+QB63kUkWnrXV/JadAyVVg3casCTzmsX4\nHETR1/UP1cA1/sS9GuL9vDAtvIos/VDtknm7TUNrqFcItB1dr4qgWwmU7YgT\n4/Qgzx3LcbVUd9lqT9nd2avcUwUo9H4pS/On2NYRMkxxKoH+BCE9Mtig+qay\n5ZWLgWQQgoEoVwgwaVJtyofiLEOYsxoR8d/VHt94gP5vymeYAiUzDZ8qDdXE\nAfeL09jOWYsTbvnyiMRa1prmwLNbgCcXqATX71MslibN+Cw8PyjKPT3OJDX7\nVRzzhJ6a+nQ2ObV6GOS4ZIBdie+zS2fPWtc3rQcyJHgQL1+nalDiRZiIbhL8\nB0li\r\n=MkPZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiKnHD2aQ1RKdUE48KAuvafoQNtvpnIyEx97adk5UdXgIhAJ1jGALVW+nUQ7FZkPlKJnbInezHHJSAQiZCPwHcRgSp"}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.0-beta.4_1556539153544_0.17352284900170178"},"_hasShrinkwrap":false},"2.0.0-beta.5":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.0-beta.4"},"version":"2.0.0-beta.5","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"e71a9b6d83c515c43f7145515f3354bef20a79bb","readme":"# useQueryState()\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![Build Status](https://travis-ci.com/xiel/location-state.svg?branch=master)](https://travis-ci.com/xiel/location-state)\n[![Greenkeeper badge](https://badges.greenkeeper.io/xiel/location-state.svg)](https://greenkeeper.io/)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers location state using modern hooks\n\n# Installation\n\n```bash\nyarn add use-location-state\n```\nIn case you use react-router, please check out the [router integration](#router-integration) segment.\n\n## Usage\n\n\nThe useQueryState() works similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook) and returns the current value and a set function in a pair.\n\nThe *important difference* is that you need to pass a __name__ before your __default value__ for your state.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\nThe name you pass will be used in the query string store the state (after the state was changed).\n\n```javascript\nsetValue('different value')\n```\nAfter calling the set function with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button).\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Example\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>Toggle</button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n\n## Router Integration\n\nWe plan to provide easy-to-use integrations for all major routers. (*more routers soon - work in progress*)\n\nAt the moment we provide integrations for: \n\n## react-router\n\n```bash\nyarn add react-router-use-location-state\n```\n```javascript\nimport { useQueryState } from 'react-router-use-location-state'\n```\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/location-state/issues).\n","readmeFilename":"README.md","_id":"use-location-state@2.0.0-beta.5","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-byGZn4JrSHMTK8CyKvkfQkOQwkfXuHmgvMFQ4+6zFGT+E+U8nwjqk1Tx0HD7tlqWYWGN28crTbv0fi+9s0hp2A==","shasum":"779a8d4efca8b5fbfc585a5724b78abbb5b77f0a","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.0-beta.5.tgz","fileCount":24,"unpackedSize":25385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcx2x2CRA9TVsSAnZWagAAAH8P/2hjcm8s4BmjlR1wGXTr\nLVCumrP0MaLHsIHrQEHVcLVpTAQxf/8IOK0Txf1nu2mC6eYxW5HR/zB0c1Af\nYS1C8gZujX6H4/TA6vsykkBoK/9drwKk9+vfq7B8uwBtE53/EJZeK9iVyR3m\n/WwvLbjWPjsJNSWfLE85sHiMbB7kc625lIkgyPATUNZmRf8vwAE8W/4bYH9Z\nay6yllnQXIcDIq7D/H3RmtE02MpPWcYAqeSKQ/1HmHOsFwVj2ZWE6UZRRrNi\nsXdfcQ1rk3/ZYaydswD2LGudzsDs+fgE7WK9JecRUP4sGbDynQ9TWLlJW34O\nCkIgnuBYFFwjZA6RjdDjBMDeSGVVZ2dcOytz+C1rXkGFEzh4tgTMw5Ivo86J\nW2IVOhzHIJkSJFggqTTY6Tjd44YE9ARcgx+X//AOMXub48EyEWEJa+Gj12At\nrLb8iNiSIsiAtK8iGlzln6wkUAd4+mnJCM/Tbk/PadV2QZU7L2cw/Y7Xc+lH\n9ueWKAlg73SfkN6D75davM4XvCqOsR2/aZWaKaZrkTQo+uhQc11HBrFUHnXG\npzUx6R6eOHmDAvU6tXcC95sfyuHtziv4rDYbKuBbA3Qs+JTlWlE+lf+8wnbF\nvAntxWXmfhbF8cF1gBNGqYy/ASz+KwrHQ1Icq01jr/ysjLw6S+944rtzykPm\nvmXU\r\n=zMDi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICskoBAuCJL45WD0gs/ZzdrLzyGiqzMIkq0lJ7by7vJgAiEAjBhmw+ll0TiDlTQW0e+gkhdf/YxOQ1ZegFWbATucwhQ="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.0-beta.5_1556573301985_0.6320492729917093"},"_hasShrinkwrap":false},"2.0.1-alpha.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.1-alpha.0+0405f88"},"version":"2.0.1-alpha.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"0405f8897834eeb7ec5e989e0a5fd16198be15e9","readme":"# useQueryState()\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![Build Status](https://travis-ci.com/xiel/location-state.svg?branch=master)](https://travis-ci.com/xiel/location-state)\n[![Greenkeeper badge](https://badges.greenkeeper.io/xiel/location-state.svg)](https://greenkeeper.io/)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers location state using modern hooks\n\n## Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share application in current state\n- supported value types: `string | number | boolean | string[]`\n- handles stringification and parsing from query string of for supported value types\n- invalid entries from the query string are discarded and the component will receive the default value instead\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\nIn case you use react-router, please check out the [router integration](#router-integration) segment.\n\n## Usage\n\nThe useQueryState() works similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook) and returns the current value and a set function in a pair.\n\nThe *important difference* is that you need to pass a __name__ before your __default value__ for your state.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\nThe name you pass will be used in the query string store the state (after the state was changed).\n\n```javascript\nsetValue('different value')\n```\nAfter calling the set function with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button).\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Example\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>Toggle</button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\nTry it: [Example in CodeSandbox](https://codesandbox.io/embed/zqm4o19yrx)\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\nTry it: [Example in CodeSandbox](https://codesandbox.io/embed/github/xiel/location-state/tree/master/src/examples/use-location-state/01-simple?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateTest.tsx)\n\n## Router Integration\n\nWe plan to provide easy-to-use integrations for all major routers. (*more routers soon - work in progress*)\nAt the moment we provide integrations for: \n\n## react-router\n\n```bash\nyarn add react-router-use-location-state\n```\n```javascript\nimport { useQueryState } from 'react-router-use-location-state'\n```\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/location-state/issues).\n","readmeFilename":"README.md","_id":"use-location-state@2.0.1-alpha.0","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-O8QFQXgKtXCBYuiV7YU8+jPs1huKN4CKfwk+OLYJmmYk9c9JMSWwftlb6h2HgpOx/9h56We4cDIeRWy5cKHP6A==","shasum":"0cbc4b07c95e857106d6fdd3a7d38733d927045b","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.1-alpha.0.tgz","fileCount":24,"unpackedSize":26453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcx/7wCRA9TVsSAnZWagAA7HUP/in3DP9Bi+bXc618Eyo/\nkHP7HdxRONYvqPlre/tWBR5fIOOz1pLjaUsS3rIisyYjTpELiL0xkR+1Bn7N\nzmOnp5OAi8Ed6JMetC5kJXHdLfspejWeXCJs5WdNKfYWOPdob8t92Qx8ddRu\ndULGXA9OiNwEwzCWhOTzU26FQSWl8pLNyZ4sroigmhl/KX+Q0BOxkcBQxpfO\no++3F3oAULRNVF2WNsae/KxfM+MDIfUCNOd6MCMl8svNG2BXSxO1aeCHs94v\nAWe9gLYBo2vvsg0BO35QvWpqjSb+SyVCZCAKx/T5qZO/jpsLKMh9sO86ZmQZ\nWhMrfEGMCE8MkJ/Hbfh3IFoWd7DDWI378VpTJXe6vwTQoF19dxkvKugapPfD\nGky08709AlOP0W8Ivwl06H/D13NKsb2avBq5tX2CvnYaxpwQbzEmZuXCTZmS\n0m7w3Mg3jousYuwQU2xTR+7j/ojfXtoY20Hf47DmaXfrDuNLwLZs3BIHbo8U\nMh0h/HaCLC05ibnwp5ikRps4om0CJsjd5CUNkDDPkxEYgI18JnukU5SNxZsI\nyshEWu1oIJX5YKTlkwcsLXA0Nz3XB3m1owJ8IJSHow8+upUd9pL0Ov301EA6\nzj9Xx4NFBumyqBmWgg9X3KV3UM7JHHAabMODmgkTI/9hHbohAlurO3g+UrqJ\nHTXa\r\n=3oED\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYvg34MW3WK7DtF3MXfPMsJni843e/FCnETqyWEXmOpAiEAzVcTUfppIXGxzsJolp4JfQPYKhs2Wgx9SQXG4XmUiiU="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.1-alpha.0_1556610799525_0.2049902909019663"},"_hasShrinkwrap":false},"2.0.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.0"},"version":"2.0.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.4"},"repository":{"type":"git","url":"git+https://github.com/xiel/location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"7250fac9c256dce1ea278289c11e2be1f8fc62bc","_id":"use-location-state@2.0.0","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-/MQYN8bJbOp7xzpXthS6kTmbcmkaoFBOs1RgdhDRgqKtaybOoiErk0xcpAa+mP30QaJqSJcdU4MURltKbBa5rw==","shasum":"cb7cf42faf0ad2b864bf56a69640f03e11533578","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.0.tgz","fileCount":24,"unpackedSize":26421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyAInCRA9TVsSAnZWagAAoTEP/2E/Icibhis4xqkj3Frp\nsSGw6IkVNf1Ex6NDWtrLvVYLVQMIid7ZIqZA+fRHig8YHO4N8i3rAWgz8+No\n00PXcxnxev69KMt8LMhbpl0iVOtBOT1T9m4iqV0db5t3fka4yiAM9u7Ymwax\neFQfCNCwYOUZ+pAwWKxRP+OVXxqFnEm+HXe4GKQBcKZntyHMbAjAyqX8kCz2\n/dOILTZ3NTlk3bN4fZGlIGsCzC+Et+mFC/SqLlF8dT82UvS+Hp599/Vrfjmk\nf3JRZ8bnnKkX3bTbrjQH8w0ZVRfW0/1VKfXgD34DnC5Nc2x8omvskDllkBQH\nsu0Rp9lslXe+nIOqbh51//PJdUkAK3jfS16BU/05TXTNAJdcZfxVNO74OZao\n8c59CdIDnFiiUmBNrY16ieC7KOWipuhlzG12k3sSRUpic04amo2HMTHt7aCd\nfCZ6+OsWn/qreH1DbnvebxM+6H0XcvsJZktKd+oXivUxe/rH1apf/gymWfYy\nS82aZ/EWJ3APWElGCP8qSsEo/pDT1d4pWAgfWCFhLuQk+zUpQMGjDFxS4r4e\nEjksJ/8HsKtqhtMZMC/GAixdqgigmDx5wKJphmsgvtaCLKC1MRWKAjhr160F\ndBhw8ePcrI7WYuxOGyBx8tAMs4GnlO0xKUXZBuqCkZHUfMiXE7Io6RPd1wB4\nvs/S\r\n=OCa1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAn7/jL0wGtrpXmRPOKzuYvaV5Ek1fBWYjBK7L/DCYXAiBh1dEj45BEDPBPbPX2oXD52P6QKnr+hcaa4OVOFc5Caw=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.0_1556611622925_0.9701979051789327"},"_hasShrinkwrap":false},"2.0.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.0.1"},"version":"2.0.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.0.0","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.4.5"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","start":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"dbda4384832293fd9fb3371d940333a9633f292d","_id":"use-location-state@2.0.1","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.13.3/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-c4mS5XCVXTX5OEIRjnUexEV4eBY7Qi48t3TmBo9wELItjrxtBka64r9HFvpw511BleH/RhrKfqd1QtMdAlrwtg==","shasum":"8fad941b912f55891d852deb54add520196a556e","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.0.1.tgz","fileCount":19,"unpackedSize":25889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyDbOCRA9TVsSAnZWagAAJ/kP/i8e4cnd9F6Hc+eZO5PZ\n06aaW/pZgR/0XQFQS+bfOGEDZ4fpEiy15j7SDBZXZtw97NHW7c5mltKW8RaT\nSddouxLd3QcZELoAbAGWLpw4CcA3n3wndUMCpx7tGIoMiiWWtXxOEuym5/MB\n3WEk033DeoTF3TRu7S3CP10IyN3W9licLZDQYzi+tZ7MutAmdvjumCf9Egxo\nM/wCBrGVtmqouYs69HAIFXvXsRqujPk64/qnZSpCoIKG8O9gT833XL7O3eeO\nWfqO+45Hs2B0A/4zuiGPli9Sp4THCPH2lAHfp4fDjC00DJRSwgbBo12hBPbr\npWk3AtHu2yTfKwalrQmBcmuyNV8oUKr62IEQKcqCk+KxxcFbjMrztdKWQ6Dl\n8JLUYIT+hyMV+o9tnlMKx80Mk6WGc9T7GKt7KlDxobqg97l0oOsy4BktU2qa\nUOTGlQzWULASSBkSLFVxisxvc4lB+jQxsjsQrV5lelxERapybkdPuiU6VsvW\n2IC3C5ID4ER3wakc7rwPsvw4Vh4txSbAIsfqU+tceVO9B+L0YSPbhVqh8mKn\nlSKBuLVo8OYiA/DOjO+GgkVhH4wM+loDjEJ5kWXyPBukfXVULa/lXyfs891W\nZRiVQl7CEls5+dDtTuvztYEwQh8w49u1ilOkR16jdFHeWzvUv2LYXVr/DiNE\nWkSj\r\n=TrSd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICoeXPXwSgVLw5gj92UivPbKLh0UzBgelHsooGgWeXy9AiEAyWg1nfdWsgH2h15Taxq6er6BnqYELsrkrGUUcCCYxVU="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.0.1_1556625101615_0.1589131673418207"},"_hasShrinkwrap":false},"2.1.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.1.0"},"version":"2.1.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.14.3","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.5.1"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"eefc753436adb9dd16eeeebcfab5456beb77534b","_id":"use-location-state@2.1.0","_nodeVersion":"11.10.1","_npmVersion":"lerna/3.13.3/node@v11.10.1+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-axDjYPGMajrieKzGIsZkDxHNm17uTdkvd4ivYoy6jP1WvHQeIsWxAcBCMT9co2gojs72Q5nBZgPdfSlEfbuVrg==","shasum":"37d7e45e8d362960853a6ba518815766a9d1a2ab","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.1.0.tgz","fileCount":19,"unpackedSize":25888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+qOaCRA9TVsSAnZWagAAzJoQAJqTkYY+jCpk+DE/K2sU\n693qAgv9ZGWPzCVQkD9BFLZRpVv0PIXYYWan5InvghQR8oX+RQuGx8rz1xHQ\nMAOfuVCM7AbzKn/ui5hi156LMdhA4JoHvmB2AGXMwa5VBnhQYx2pajWgIxDK\nZes584YmXOlwYVhD1LfGIF0KPVOHdV+VJFe2T5M1NH5bpuJLLFRMd8S35K5A\nXdy9dwk5o/K96gzlBXwsC0mFlyARHiy6p9Qi0xcZmIu4N1SQGjFK4hnYjeXz\nqEkOjlPw4k47I3IY9D0dLShvVnwHi2d04McjsVcAw3ezRDXbmTp66sxlgpND\nJL3gNGOApjOpAAEy9QwvvsQxbO7wteGZ88SfriphTcDN/4N2a4U2/+STIhek\n1krZUkOoCYITR2arzNHrGy7bKkH4rJuK9kxq6ID1lmXSRXsWOaB37EtVaSxE\nRuv/DguLENm8nMM+fhmd28Wfc5cSxNTOIu6B4FBoJwIi9UGZTC8QC21/iV/i\nrw4ghYLXt08Fo1vOWznMMkywB3aRYxiqldqp1f1Bp7YZEnUGEhabAVltu5Qr\nQeyRaMGIgo0UoZgjrFaex64C4fRXM/wKJdKnR4bgzZK0+BqDSn8j1BaBiFxY\n0xgZ0aZHQHaNiZEhdISes7WeFNSnOO+Ga6mVDn72HoJ47wkpVmR6vuA/zTp1\nRB80\r\n=R93d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSarBG9LsDDNBcdWCELbOL4HPAypRQMV8hMbvBvJSeHQIgbrKLod+YpRo6eml3F1Iy+oWk8YCDEpXmZtxNlYFTIJ4="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.1.0_1559929753948_0.5431179195879503"},"_hasShrinkwrap":false},"2.1.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.1.1"},"version":"2.1.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.14.3","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.5.1"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"f8c9e82d661abebc7e2a2270246d75fffa9748d7","_id":"use-location-state@2.1.1","_nodeVersion":"11.10.1","_npmVersion":"lerna/3.13.3/node@v11.10.1+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-iwY9COcH1g0mDZ29npTZ6n+BmXL6J6JPeYjoo5VRBDLPL77Ul2Muyb49yAw/F09eW9O/aQ3UuTDwtLcoKoDctA==","shasum":"c0b4009d894ac7239ae3438d706a1631bdfd57b3","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.1.1.tgz","fileCount":19,"unpackedSize":26638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+uZACRA9TVsSAnZWagAAuvsP/0eBZ3H46IPSTIVg/aO7\nItkF0cnXzdB3Sj9liO/JTbnCT5Zo/xBnRepTZTZo2PnkCjPuPeieqXuBj1X2\nGV+0PJg7cE+NJido17n9nCRoiBNv74zo7yXT9WpxsgiD4umTsWFXb8hrluZ2\nhnxo67pVTXLc9TuwT7zCwlnvKHZXsfwcRwK7BJRaCRs1eazph8lZcdGX11/f\nvDfsrBjBCv/Dc3YFnNQwLLaIduvSVR4lU+W00Fg4/sdF/Y6t9qcOLuJfhDvx\nzgUbqjWSc6yQLaKR2o2ULWUmocJa1e+sU6ZRqBW8eFH88geg6k1VNIBJuDKy\nxEgEimItsPGCah2/v5b1yu7aOp84wZgU0AgbN0uU1TRKIw63Awj0iVNIZ7bM\nlxdqPv+hP1GDH4MYGbzHf9SxehrvgzAsQ/48xG/1FGLJK3/zUpho37pLTcR8\naEYMHmP6KJzrMqANukSb6rWY9UAZ5XbLC6UrX8jYYJtjo/rgKhXnPVOiT8Y7\n22EMjZvWZmpK7gitNxEJlrkoqyS5SCRMzmVHF4+X5HAw0VUDakhEQKW91CGY\nWPMwcV16D2IAhBi2YDevREaiE5LlCMZKv8Nlada1bp4z3aIbqMzXgX2k9hSn\nnR8fzAfmRH8woWYVGJpp7vsROxJBaEB8XSHoQ1qG8Zb++YB1dtpOk/L6VmF2\nvyWh\r\n=UzL1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFgf8qn59KuazzntdgaD+dc+KUWyiexugmWcVtsSpM1cAiEAzMyujYLjFJbscxQcwZJ4vDL6ux0E1bKC1PSd9RARvCQ="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.1.1_1559946815535_0.14320929718042708"},"_hasShrinkwrap":false},"2.1.2":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.1.2"},"version":"2.1.2","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.14.3","rollup-plugin-typescript2":"^0.21.0","tslib":"^1.9.3","typescript":"3.5.1"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"e01f06f2f522f5c6fe87cd88b7ea103a72ebb388","_id":"use-location-state@2.1.2","_nodeVersion":"11.10.1","_npmVersion":"lerna/3.14.1/node@v11.10.1+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-+BOGtcCHmy5H2g2fEDJ+zIs/TE6b7uSiEo/fm5eX7jaQGEBLeTuwpwtc49ACww4ZCIR1on4HYK4JhF2gBrpo4w==","shasum":"9647bd0ec5099fbde17b67a8e46c3890e237e5db","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.1.2.tgz","fileCount":19,"unpackedSize":26638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+5FCCRA9TVsSAnZWagAAGDkP/RaNtOUmTG6xdaaVdUjq\nVaiL0tsXi+mmGrzV57bvjpnltghcobTECtIWfmmxrsY/2Fj2q7esMIbprfWa\nLCp9tnYHVVzaEjKsQ5F2tFvZEqQmC6W1raKzgtIuZDI1kWte1n6WM7FJMiYG\nkZPeHZ+VYlTJN40sGKtbbm3/2AYRpktV5BaDEM3GGtMZE14GlxlSbn7OoFWa\nWgnZLltAQsrCY0DYOM8oYyzpMwTN6hgzOruO5UX0wNEI7lsPtYmCYn9/2Cir\nS4pZODZnLBHPCA6q01sYpmxx+7psC22dpeuqLDQmdWJtkypneeapbdBCyMLw\ngMoQc0FCEke6PYcqy1vJgyrnHSqZu9OFZ2cFLZ3Di5IrTXBDeL1zbWYelQin\nphkORH+grKvemkzZD82qQENSJet3B7Euw7IOH0hGvgNhZr+24q9AEyOdKwM1\n01CWfB5dKR2XraQ8fdn8c5Iu3Ax8wIM5HGX/hVJRESnFd8Ckyf3nTKJL+eHK\ndARdihQ4zxKh3J6eGzlDlV3a4zVfMnjFBNIQz/rC2ZrzebR6ojY+66AX2tOO\nXJhk/nTTA2HeeLGM6Zio/BPI4op39SAWbSY57c6pd605CnkyeFLB4GAKa75d\nbbl8lvU2QPcJb1DJn2gIt4VdWpZ+BrOzuAHN3NfJD3sVuHaiDoJuAY/EMUT/\n2rFa\r\n=ZTlp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9Wil3L41flp8vGVjqcPhZc6Jas1ywKQIlga5+5bhWyAiEAwU3ou7clFBx8E2v4Ru7VOBzGB3GJ/YEgoZq3L5bIA30="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.1.2_1559990593464_0.7969867384451694"},"_hasShrinkwrap":false},"2.1.3":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.1.3"},"version":"2.1.3","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.19.2","rollup-plugin-typescript2":"^0.22.0","tslib":"^1.9.3","typescript":"3.5.1"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"5472d8a1ffda56c6fb07978efa20cf42dc98b3b5","readme":"# useQueryState()\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![Build Status](https://travis-ci.com/xiel/use-location-state.svg?branch=master)](https://travis-ci.com/xiel/use-location-state)\n[![Greenkeeper badge](https://badges.greenkeeper.io/xiel/use-location-state.svg)](https://greenkeeper.io/)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/use-location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/use-location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/use-location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers location state using modern hooks\n\n## ✨ Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share application in current state\n- supported value types: `string | number | boolean | string[]`\n- handles stringification and parsing from query string of for supported value types\n- invalid entries from the query string are discarded and the component will receive the defaultValue instead\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\n\nOr install one of the optional [router integrations](#router-integration-optional)\n\n## Usage\n\nThe useQueryState() works similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook) and returns the current value and a set function in a pair.\n\nThe *important difference* is that you need to pass a __name__ before your __default value__ for your state.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\nThe name you pass will be used in the query string store the state (after the state was changed).\n\n```javascript\nsetValue('different value')\n```\nAfter calling the set function with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button).\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Example\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>Toggle</button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n<a href=\"https://codesandbox.io/embed/zqm4o19yrx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\n<a href=\"https://codesandbox.io/embed/github/xiel/use-location-state/tree/master/src/examples/use-location-state/?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n## Router Integration (optional)\n\nIn case you want use [`location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location/search) (after the question mark in the url) you need to use one of these extended versions of the package.\n\nWe plan to provide clean and easy-to-use integrations for all popular routers. \nAt the moment we provide integrations for:\n\n### react-router (react-router@^5.0.0)\n\n```bash\nyarn add react-router-use-location-state\n```\n```javascript\nimport { useQueryState } from 'react-router-use-location-state'\n```\nUsage works the same as described above, except that the URL will look like this now:\n```javascript\nhttp://localhost:3000/?itemName=different+value\n```\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/react-router-use-location-state?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Edit react-router-use-location-state-example\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### More routers soon - work in progress\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/use-location-state/issues).\n","readmeFilename":"README.md","_id":"use-location-state@2.1.3","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.14.1/node@v12.6.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-TjfglF0ZIaQk1E2IS+JbY4Af8pCsafm5szzhWtfR1ZTXBqq+VjGm0XnTNNY1xDfhLIx55ep91+0C32Dr9QTlag==","shasum":"c26fef7e5ad87d7dc210b9454423f067edd323db","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.1.3.tgz","fileCount":19,"unpackedSize":26629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSKDhCRA9TVsSAnZWagAAWwMQAJ2Sye8WI15gMDgLBRj4\nl6wfO1SA7zCpBGrvN1Cjo2kxlouF/vaG9I9/KBi2PglvCjjAlUnfeqEhcG9S\n2UOVfMcyampoUSbXJB0V4rU8hlMf462LUecgd0CK9kbcME85AzwRf6tN61fV\nuq/h9J/83mQhGNgP5p006QmPYDna+Cdin1ljyNZlv/IEXqOF2NUbAcY+QvrJ\ntHydK5sKLOf66xNbgzHiF1dSzR450iMmOJqEBrE5ou8AqbBSaJV3tf1WJfs4\nNb5q7XC2+NTY/uHBc8CevE0CckLORwQDu4Kn/PqPqYcfk2lgT4AKv4lmrOsL\neJl8X9C2+nnI8m6z23C6sUOdVtv65JZyR4l825ylNUo4AbEs0oUEMlFQNW12\ncsB/qxmbh7rfPfW4LZqMX0Qv9W6g3TbUyXnov2Xzxq2TMvwQYq5UJ7HXAYEd\nvf60StryEFGh1TsKuxSfTLpPjOyCn1rU9195Uls63Wr8wgwqmROguLqgTn6w\nMDhK66g4B4GQhpR+lGHRWbKbNAFtFLAFtVU6qMsQwxOZNPDrEv3jPG9BABsg\n3tHl4osm/1JLDUPi72vrgGDA77fNdgCGURg4iTQ9GLWOhWgwVlPABpeLM4dS\npesG5Joi8kvh+RzrChSgPBdBHOwR/m9mkpAlzLHlhkyK9NPT+Tbc6/EWSGCH\npJIb\r\n=9JU5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFc9bOsurAAEs54afWOYP/TsYv+IQy8W3hSnmoM0JpPEAiAzFZypPuTeMPFkT+sKWzvHrheKe+zBDoLR9tLnXXV8vA=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.1.3_1565040865194_0.26618191683226855"},"_hasShrinkwrap":false},"2.1.4":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.1.4"},"version":"2.1.4","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.19.2","rollup-plugin-typescript2":"^0.22.0","tslib":"^1.9.3","typescript":"3.5.1"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"f22277cef74deeb254c7406a222b5a8a79cde8f4","readme":"# useQueryState()\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![Build Status](https://travis-ci.com/xiel/use-location-state.svg?branch=master)](https://travis-ci.com/xiel/use-location-state)\n[![Greenkeeper badge](https://badges.greenkeeper.io/xiel/use-location-state.svg)](https://greenkeeper.io/)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/use-location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/use-location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/use-location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers location state using modern hooks\n\n## ✨ Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share application in current state\n- supported value types: `string | number | boolean | string[] | Date`\n- handles stringification and parsing from query string of for supported value types\n- invalid entries from the query string are discarded and the component will receive the defaultValue instead\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\n\nOr install one of the optional [router integrations](#router-integration-optional)\n\n## Usage\n\nThe useQueryState() works similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook) and returns the current value and a set function in a pair.\n\nThe *important difference* is that you need to pass a __name__ before your __default value__ for your state.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\nThe name you pass will be used in the query string store the state (after the state was changed).\n\n```javascript\nsetValue('different value')\n```\nAfter calling the set function with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button).\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Example\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>Toggle</button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n<a href=\"https://codesandbox.io/embed/zqm4o19yrx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\n<a href=\"https://codesandbox.io/embed/github/xiel/use-location-state/tree/master/src/examples/use-location-state/?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n## Router Integration (optional)\n\nIn case you want use [`location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location/search) (after the question mark in the url) you need to use one of these extended versions of the package.\n\nWe plan to provide clean and easy-to-use integrations for all popular routers. \nAt the moment we provide integrations for:\n\n### react-router (react-router@^5.0.0)\n\n```bash\nyarn add react-router-use-location-state\n```\n```javascript\nimport { useQueryState } from 'react-router-use-location-state'\n```\nUsage works the same as described above, except that the URL will look like this now:\n```javascript\nhttp://localhost:3000/?itemName=different+value\n```\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/react-router-use-location-state?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Edit react-router-use-location-state-example\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### More routers soon - work in progress\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/use-location-state/issues).\n","readmeFilename":"README.md","_id":"use-location-state@2.1.4","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.14.1/node@v12.6.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-XtRGQywzxqBmQw63UjMecJn9+zPIxjVws/hAcv4rerKZOjtsbaiZciHuzR2H+7Gxbx3LK84Ac/ezvnaCzYRQMg==","shasum":"4f9934f77f00a3a915a96a085311d970f1a97a99","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.1.4.tgz","fileCount":19,"unpackedSize":26890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSKZRCRA9TVsSAnZWagAAZ9YP/i2JLfZq0xSSHZKUG1nC\nBMyfm4d01rROWzYWCnKD1yPNSZvyySusAnGKCb0lSyE/9B60FIrYBSOL/f1b\niCuQjmj0R7aTqC1sIw3hBBS4TgqrB0IBp1DZfNQeFkGvknJ44/cJjNi3JfMs\nH4EpT6ybH337Cdcy0jKTLJEm+LMT91xWUwGu/obJdAdUqPGldpOfc+JoyTUR\n0tjqp6bT5T8zBQ3EU8xTZf79M6rJCqg55zrEiMI44KPPr83952syvo9T78H8\nJ0RFeBqVfcooNXgPGKIKjcGpGyTegGlnUuwyKGX2jDI5YiroWpdghrSEl6BG\nNcHW7dt0+P4ixkkYzr8SgVr/NPA7A707GfjACsiSGSxp3mIDFh3tSQdg2lGF\n2up0KGXcTMWdeHcdYFaJohgq67SX/E6NU4bkLibsfLQB/ecE/+LrSPyRLoQD\nSVQKIWq/A8YnSQyLwSby93IRdjy+iP8uYaJEEMSizNnOoWk1MnVwe+T3iID9\nVCNWl9P7EQFSWzVcXyF6e3VgOn4CV7EBcf+W7IalInXqR9yBLTf4KParmHa0\nF1gjq+SNhmASN/1CFUmtd9YqshnV0mBw/ZO4B7O/7GfC+PjKti7MsNQGPCna\n7VXDkYj7P0GEUNnONe1YlHpPDsM0rVsp8lLer2lv2ykxRi6OwQ/u+KCioXvg\nLtLq\r\n=ur+g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC67TyTdl9ikcsPOrzVsXDU3dzUABXCUpMZcY6j1A0CzAiA3g0xOhMkW6AJAHwZm2OD3mQYvSJd8D/Ttcoal4f/aSg=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.1.4_1565042256145_0.20945996303174752"},"_hasShrinkwrap":false},"2.1.5":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.6"},"dependencies":{"query-state-core":"^2.1.5"},"version":"2.1.5","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.8.6","rollup":"^1.19.3","rollup-plugin-typescript2":"^0.22.0","tslib":"^1.9.3","typescript":"3.5.1"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"b1d83deb91cb6ff88222dd712a9ce66cd4a8cd9f","_id":"use-location-state@2.1.5","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.14.1/node@v12.6.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-Dx0y7JX6wfKM+Y3DkseZvt/z/UJuzJqvLiFrj1UeouU7FogWFF31n/rqK2wCGWw9+PCrXYixs6ca2R929SpaNw==","shasum":"d869e0886003b40cfa99193c0f4f09c0b2997aed","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.1.5.tgz","fileCount":19,"unpackedSize":26890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSd6lCRA9TVsSAnZWagAAMVAP/3NJa8dOlWpXwk1lWWSQ\nBnA8LHI1R2l1shplRAECzWtubAxUvzdjesQyLReAdFy2d2l+14bUABTnn5QR\nk0Dk/mDUbXSrjTU4rnujcvb7NXvbQfaFObe0M6RlL2lSWcg5No4ytB/MUNqn\nowO64aPPvIqLBbXOVh0FNx2ddiz96JM/xyP2+cFFNvcOyXGwWD39fmTsb2n3\ngyd985U879kycZyEGR/rYYHhj+3bWmBk7RXK74ibsZFWCc5SktZHO5ZjNIjp\nx8qV4Js4STP+8wUIMM3xMEYANURyzSZUhctGaKGlVkwlTfxDegxNZXfdloBf\nBRF1/jPDpOeNa58KI37D/Ds5fP5PpqvedzIVKtUfBgsT54tN2y4Nugdmr4tM\nZ+4II9kE2WCV8mo6cHKO08Q2F4bClteOdgFz0scr5PAKTmWHml+F3iPhiyL5\n8wjtMQ/en9qkkjbEbtaKYwVDYlEiBOaKyD9ABOncPPFn/ykijEJLiSm9S1s+\n5Cw6dYgQaljxgAQrbJC1xsDI/rio/KUm3PdW7NJQx91mP+XCmlYvzMI16LqO\nDUmiYLtKwd1tUlTqSnrn6oqdoAYYd09MWxl3c5i7UEXdcSEjvb1vvSFAvlNt\nJ67gjICi873voMVXXMHOiHqxhUheUMMXR8A6MzXd3bEOar/oNKPXjLPVWS5Y\n1ojg\r\n=I75V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEVuAc2EpaFTqTk3VG1HyeGdgOycniDYJDwkIOsIxHnRAiA98lLp+2icq7zB1tvSRCNAkWjf2pB5UEXZo+Wu/WwOGA=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.1.5_1565122213042_0.8081430231720976"},"_hasShrinkwrap":false},"2.2.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.9.0"},"dependencies":{"query-state-core":"^2.2.0"},"version":"2.2.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","eslint-config-prettier":"^6.0.0","eslint-plugin-prettier":"^3.1.0","eslint-plugin-react":"^7.14.3","eslint-plugin-react-app":"^6.0.1","react":"^16.9.0","rollup":"^1.19.3","rollup-plugin-typescript2":"^0.24.0","tslib":"^1.9.3","typescript":"^3.6.3"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"bdcea17b02e683612f00d8f01e6f81fba17bcdc1","_id":"use-location-state@2.2.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.4/node@v12.6.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-nb8RKMN40cQ5lmnvnS4tpJwZ0KtIhfCgTkpoW/xETGN/HB1F7yo3O81Sf73ugCzHo+PVzirIlkye6ldfoa/yLA==","shasum":"ab7d1599c8ea0d1e58eaa7d457c0873a0c287ec7","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.2.0.tgz","fileCount":25,"unpackedSize":31079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdf9xyCRA9TVsSAnZWagAAS2kP/RtpyNFB5bAzFh59zdlP\njL+WF/xr2ECKefRhjtgxWo6L6dSDS1nkcSEC9JvtmATT8kNM9FsRNJb6jSiR\nMvRR6iOlX4l7Il8o4fxlPra4mVFlCeN8wsxkL9kO/IwDfHWfYi6+6nVdpMZM\n77OKJGIYyw3VoId3NUSzoHsUulVDRJDlZ/JilbnH1bC9DCPhJuTjx3QYh9ts\nNsnD0M7v2XQER9Zb9PTRrWWka+pptZ/4b0xkSYvLNqeYrbjxv8JYXnsthDzn\nEl3nonaI/5IM7uzJQZA+nPwaFRIz8/vjP6FDA6REcpHq92Pllu/7Q7v4JbwM\nO3oCuny7nNzq/J/+Mo8CkAPJ/9rcRG6boOY/luNrSkI3sIjB0CnPmOjSVdBr\ne88GHTrlqw2M9bfdon23pmjb5nCGiwC+dxK2DyUs+0MV7TPTu6JCQKV2FZ51\n6+JBwNHc3mBZzHIKo+BgMCNZYa2klx2DtuJWjIlNhLTxrLr6rpTqH406nhqX\nm1CkDbyCnd2uH3xe0Pyn0NgCbO0334FYUFi9GyGMqKzyQTmNWfgxHvVFDrGx\n4wEV4gSTX71izxVr8lvSzRXpiGiXMYmBHC278GsrYyZSgq7ccJknFPoE9zaS\n0iDyKqnM9k0BzadPkCNao/tf3Is3O0gZbd/Z92OhmyuitiGpZqxwZhKrv7UP\nh+7e\r\n=Cbn2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqIPMeK7sH/M497XbwVQDLT4LkutQU0ZWPYblbJ3LPkQIhAO0xmoXdJ0Ep5U2bpwH6ii4AAN8IPN15zOLT8LlHCk7J"}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.2.0_1568660593613_0.11183900076415498"},"_hasShrinkwrap":false},"2.3.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.9.0"},"dependencies":{"query-state-core":"^2.3.0"},"version":"2.3.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","eslint-config-prettier":"^6.0.0","eslint-plugin-prettier":"^3.1.0","eslint-plugin-react":"^7.14.3","eslint-plugin-react-app":"^6.0.1","react":"^16.9.0","rollup":"^1.19.3","rollup-plugin-typescript2":"^0.24.0","tslib":"^1.9.3","typescript":"^3.6.3"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"365b2ba5d13e32cb91a382356332330e3ab6e194","readme":"<h1 style=\"width: 100%; text-align: center;\"> { useLocationState, useQueryState }</h1>\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![Build Status](https://travis-ci.com/xiel/use-location-state.svg?branch=master)](https://travis-ci.com/xiel/use-location-state)\n[![Greenkeeper badge](https://badges.greenkeeper.io/xiel/use-location-state.svg)](https://greenkeeper.io/)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/use-location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/use-location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/use-location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers [location history](https://developer.mozilla.org/en-US/docs/Web/API/History) using modern hooks\n\n## ✨ Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share the application in a customizable state\n- __`useLocationState(name, defaultValue)`__\n  - restores the latest value after navigation actions (back/forward), by keeping value in `history.state`\n  - supported value types: `string | number | boolean | Date | Array | Object`\n  - handles complex & nested values - all values that can be serialized are supported\n- __`useQueryState(name, defaultValue)`__\n  - restores the latest value from URL (`location.href`) and after navigation actions (back/forward)\n  - supported value types: `string | number | boolean | Date | string[]`\n  - handles stringification and parsing from query string of for supported value types\n  - invalid entries from the query string are discarded and the component will receive the defaultValue instead\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\n\nUsing __`react-router`__ or another popular router? For the best experience install one of the [router integrations](#router-integration-optional).\n\n## Usage\n\n`useLocationState()` and `useQueryState()` work similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook), as they also return the current value and a update function in a tuple `[currentValue, updateValueFn]`. \n\nThe *important difference* is that __you must pass a name__ before your __default value__ for your state.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\nconst [priceMax, setPriceMax] = useQueryState('priceMax', 30)\n```\n\n### useLocationState()\n\n`useLocationState()` is perfect, when you want to store a state that should not be reflected in the URL or in case of a complex data structure like a nested object/array.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\n```\n\nThe name you pass, in this case `'commentText'`, will be used as a key when storing the value. So when you use the same name in another component, you will get the same state.\n\n```javascript\nsetCommentText('Wow, this works like a charm!')\n```\nThe updated state will be restored when the pages reloads and after the user navigated to a new page and comes back using a back/forward action.\n\n### useQueryState()\n\n `useQueryState()` is a great, when you want to store information about the current state of you app in the URL. \n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\nThe name you pass will be used as a parameter name in the query string, when setting a new value:\n\n```javascript\nsetValue('different value')\n```\nAfter calling the update function `setValue()` with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button) or by loading the same URL anywhere else.\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Push\n\nIn cases where you want the updated state to be represented as a __new entry in the history__ you can pass a options object to the set function, with the method property set to `'push'`. \n\n```javascript\nsetValue('a pushed value', { method: 'push' })\n```\n\nThis changes the way this state change is handled when the user navigates. When the user now clicks the Back-Button, this state gets popped and the previous state is restored (instead of eg. navigating away).\n\n### Example\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>Toggle</button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n<a href=\"https://codesandbox.io/embed/zqm4o19yrx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\n<a href=\"https://codesandbox.io/embed/github/xiel/use-location-state/tree/master/src/examples/use-location-state/?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n## Router Integration (optional)\n\nIn case you want use [`location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location/search) (after the question mark in the url) you need to use one of these extended versions of the package.\n\nWe plan to provide clean and easy-to-use integrations for all popular routers. \nAt the moment we provide integrations for:\n\n### react-router (react-router@^5.0.0)\n\n```bash\nyarn add react-router-use-location-state\n```\n```javascript\nimport { useLocationState, useQueryState } from 'react-router-use-location-state'\n```\nUsage works the same as described above, except that the URL will look like this now:\n```javascript\nhttp://localhost:3000/?itemName=different+value\n```\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/react-router-use-location-state?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Edit react-router-use-location-state-example\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### More routers soon - work in progress\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/use-location-state/issues).\n\n## Compatibility\n\nTested in current versions Chrome, Firefox, Safari, Edge, and IE11. This library relies on new, yet stable ECMAScript features, so you might need to include a [polyfill](https://www.npmjs.com/package/react-app-polyfill#polyfilling-other-language-features) if you want to support older browsers like IE11:\n\n```javascript\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n","readmeFilename":"README.md","_id":"use-location-state@2.3.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.4/node@v12.6.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-qXQMKj0S8inWRAhv6+C9uuqc/8NkzclXwYeg0grbCd1Uup4xiGfcZj7Ar01UAtwdypK3hwwXj05Gdz9ZSpvo+w==","shasum":"7285c3e58cd6fe63ed7a436b3d3f45d82cf6603a","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.3.0.tgz","fileCount":15,"unpackedSize":42343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg3IaCRA9TVsSAnZWagAAuosP/3Nlj9dNnh2U/zXSNJCj\nMBc9kkDpB9DSF352PglDcw8qf9BLBjwKEFZBopEiBD64rCKPIimEJ5LaieCZ\nToMfNtcaRUIJWsI1sQ5Mud2qSr05q7ucRT23SBxDVshStp4Z4emEkbmF1eAs\nlWMevdDZTLJ090sc2eHC6516liZX/DJuxgKwznkfpXUS5+tGe2GdXRiRuO+H\nya0x2qHs2+x0qzRA21R0hqQuEAmxb8Jsn84voD9ZbpYcVTH8g4PeEdZ1sekV\nCJjx5MGzGFYziN2XEeo/d4SN71s/465AGY+WDuTx+PY52fW8yuV7PGknjSiD\n6xDMyKMOCaJXPu2w+GG+Ztfox/PFNpmcQ6J3/bcHwOCCLBDslBZ+QnET9OL9\nCRbBzlI1GvrlK3bZAvMTl7ahAGLCCAl8EzgIh39HOvUsOxVHk6+qDlgNItGv\nHA8keBF84UPXvPaj9eXGNHneBp9ULx0iWqmTsOaZF46f+7OptQ0t2g2wqrm6\nMXfriZuD+oTUewCyqHMu5aPLaAihbG42Z+yuPV2nSoJyYvgHx2ZUmPPi01A6\nqFRg78/3Ykh6F2RLh5YRHC7G1B40TqcZp0VuJZopkYhWfvy+RO2t9gecFCu5\nZGsjhcNB1Z6x6QOfm5RdrI5L9zRseYpRfKbDurqhUGu2lHB81GwU9uDZ8nUS\nUzpJ\r\n=YZL6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAqNoJy6decGiyuHlT0PAnwvpMsIk2kYvIhsMf8q2YDXAiEAr16tUT+aXEHBh7CUTuOKrtWRcCVnnEBkoMG6O1tu4uw="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.3.0_1568895513409_0.6844758249509473"},"_hasShrinkwrap":false},"2.3.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.0"},"dependencies":{"query-state-core":"^2.3.0"},"version":"2.3.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.9.0","rollup":"^1.19.3","rollup-plugin-typescript2":"^0.24.0","tslib":"^1.9.3","typescript":"^3.6.3"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"2248d0e2266c0e971551fe70bcf82fb6941ff2c2","_id":"use-location-state@2.3.1","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.16.4/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-dR8pm7rCtQ0MsUy7O4upotBRooV0knsrEVnOntkoM2I2SKckb2luRSvE/wSPsHNYUj5DdLgoq+10/4A/9P11zw==","shasum":"5975e55e1253d3203caf1060e6e9e4e408d33c24","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.3.1.tgz","fileCount":15,"unpackedSize":42283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnPUxCRA9TVsSAnZWagAAbtwP/iHAFZv2JrQbp7qZDAgG\nS8fjAaMrZFSjW7xNUSOtUh0hqJzAb/vOgCzQa7B5zOiAdAF5OCh2o15+UTJc\n3isSV7T2cDJp2wvThmdjRUpqjgQNeZRqTnTM3B9tCFhCFUz6HVtUBT/2UVTi\nbkh5bXB3Rgcys1uHPlA0vH8/9NoPprWsgY4R7FUNchnCLROK+gf91y/QUS0C\nNQ0LlXTplHB5KwIXUY8rUZWhnN705Ndxy7xpangLV87mc/p3ZjWnWZx0bq4o\n4Jozdaj+AwoQnocdoTJxt9o3R5JyA/nC3yWw1WHJIO7lGT1rcUMT8st2aLf4\novA+YsfEMAWr9rjFAaaRhzvRtz/YVSqDBHFiIr7foC6ePiFMgeLwX6C1X6aM\nxxIDlaiBmk+OYMujbcfS0VzzZkPIoiJw6DzzB6Qf1g5G1dh6ZqgLGoL38nte\nSdXas09T/kUNuGqyiL6gDhaZfMrqgn+DTgHM6fdKiztCCmHMFKb3XyS3rXzo\ntC5W08PFUrxO/o22rcqc4LXc8500dGgtBwd37Y+2x69ZPZsUlr7gg5f1XDUz\nhbrLdbfcZhXBVTKhwSEfeknwiCF/4b1e/v4yUgZNz6KNzINPatYC+KjQx4OW\nRM1VNwI0VmuoTrPKJZ2llFkcbNn6lZVxetbW5Ga3RMkCOLBh7qYU2RxQ5mgh\nyXWb\r\n=bD6v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTtCNd605yqH8PoNnEJTI5vmfIJhiqIMtSyuJEYdDbtAiEAvNomHb3eXyYqZsX5VoBijzKfJpgLl6Jro2e8DjC7rus="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.3.1_1570567473250_0.05609044645614092"},"_hasShrinkwrap":false},"2.4.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.0"},"dependencies":{"query-state-core":"^2.4.0"},"version":"2.4.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.9.0","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"378cd4bffb30a0f96f0d68b1959fb5050114a5cc","readme":"<div style=\"width: 100%; text-align: center;\">\n    <h1>{ useLocationState, useQueryState }</h1>\n</div>\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/use-location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/use-location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/use-location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers [location history](https://developer.mozilla.org/en-US/docs/Web/API/History) using modern hooks\n\n## ✨ Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share the application in a customizable state\n- **`useLocationState(name, defaultValue)`**\n  - restores the latest value after navigation actions (back/forward), by keeping value in `history.state`\n  - supported value types: `string | number | boolean | Date | Array | Object`\n  - handles complex & nested values - all values that can be serialized are supported\n- **`useQueryState(name, defaultValue)`**\n  - restores the latest value from URL (`location.href`) and after navigation actions (back/forward)\n  - supported value types: `string | number | boolean | Date | string[]`\n  - handles stringification and parsing from query string of for supported value types\n  - invalid entries from the query string are discarded and the component will receive the defaultValue instead\n\n<img style=\"display: block; margin: auto;\" src=\"https://repository-images.githubusercontent.com/182417896/058a9d00-e2e1-11e9-8467-8923219ec500\" />\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\n\nUsing **`react-router`** or another popular router? For the best experience install one of the [router integrations](#router-integration-optional).\n\n## Usage\n\n`useLocationState()` and `useQueryState()` work similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook), as they also return the current value and a update function in a tuple `[currentValue, updateValueFn]`.\n\nThe _important difference_ is that **you must pass a name** before your **default value** for your state.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\nconst [priceMax, setPriceMax] = useQueryState('priceMax', 30)\n```\n\n### useLocationState()\n\n`useLocationState()` is perfect, when you want to store a state that should not be reflected in the URL or in case of a complex data structure like a nested object/array.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\n```\n\nThe name you pass, in this case `'commentText'`, will be used as a key when storing the value. So when you use the same name (and default value) in another component, you will get the same state.\n\n```javascript\nsetCommentText('Wow, this works like a charm!')\n```\n\nThe updated state will be restored when the pages reloads and after the user navigated to a new page and comes back using a back/forward action.\n\n### useQueryState()\n\n`useQueryState()` is a great, when you want to store information about the current state of you app in the URL.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\n\nThe name you pass will be used as a parameter name in the query string, when setting a new value:\n\n```javascript\nsetValue('different value')\n```\n\nAfter calling the update function `setValue()` with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button) or by loading the same URL anywhere else.\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Push\n\nIn cases where you want the updated state to be represented as a **new entry in the history** you can pass a options object to the set function, with the method property set to `'push'`.\n\n```javascript\nsetValue('a pushed value', { method: 'push' })\n```\n\nThis changes the way this state change is handled when the user navigates. When the user now clicks the Back-Button, this state gets popped and the previous state is restored (instead of eg. navigating away).\n\n### Example\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>\n        Toggle\n      </button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n\n<a href=\"https://codesandbox.io/embed/zqm4o19yrx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\n\n<a href=\"https://codesandbox.io/embed/github/xiel/use-location-state/tree/master/src/examples/use-location-state/?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n## Router Integration (optional)\n\nIn case you want use [`location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location/search) (after the question mark in the url) you need to use one of these extended versions of the package.\n\nWe plan to provide clean and easy-to-use integrations for all popular routers.\nAt the moment we provide integrations for:\n\n### react-router (react-router@^5.0.0)\n\n```bash\nyarn add react-router-use-location-state\n```\n\n```javascript\nimport { useLocationState, useQueryState } from 'react-router-use-location-state'\n```\n\nUsage works the same as described above, except that the URL will look like this now:\n\n```javascript\nhttp://localhost:3000/?itemName=different+value\n```\n\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/react-router-use-location-state?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Edit react-router-use-location-state-example\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### Gatsby & @reach/router\n\nGatsby & Reach Router are supported. Gatsby currently always scrolls up on location (state) changes. To keep the scroll position, when you update location state using the update function of `useLocationState`, add these lines to the **gatsby-browser.js** file in gatsby root folder.\n\n```javascript\n// keeps same scroll pos when history state is pushed/replaced (same location === same position)\n// see: https://www.gatsbyjs.org/docs/browser-apis/#shouldUpdateScroll\nexports.shouldUpdateScroll = ({ routerProps, getSavedScrollPosition }) => {\n  const currentPosition = getSavedScrollPosition(routerProps.location)\n  return currentPosition || true\n}\n```\n\n### More routers soon - work in progress\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/use-location-state/issues).\n\n## Compatibility\n\nTested in current versions Chrome, Firefox, Safari, Edge, and IE11. This library relies on new, yet stable ECMAScript features, so you might need to include a [polyfill](https://www.npmjs.com/package/react-app-polyfill#polyfilling-other-language-features) if you want to support older browsers like IE11:\n\n```javascript\nimport 'react-app-polyfill/ie11'\nimport 'react-app-polyfill/stable'\n```\n","readmeFilename":"README.md","_id":"use-location-state@2.4.0","_nodeVersion":"12.16.3","_npmVersion":"lerna/3.22.1/node@v12.16.3+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-yS9Wfz4vra0TAkVm1925QqJt8yjgXYToUX1W1tYwtsvV34llLetaK/rbESd1T9ovQpZ1eymch923DXdLA27v3w==","shasum":"3d5a3ca3e386d04cf8e96bc6207e0dd8685d48af","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.4.0.tgz","fileCount":31,"unpackedSize":52247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+jBJCRA9TVsSAnZWagAAFzYP/jmVNF04A5autN8r9Hp5\nKfVtut2tG1swAkfxtRXIqMIEhwnqfbjHNOao9vUqWVqf0kl3KF8JyGH5ZCpx\n04Qoo7P5oFXDi2GZcxUgkIg/goh4448Z4eSqFrSubVqgW5iGV3lg8i2r4yrf\nKiuKBs3/p0MZ4Nk0ZbT63+UH05rWIx+xxpNAtxtDMNi2tRTPsbG3XALMI0v/\nHkwBOHMYN/+iLTcZ5q5ooGG8fxkCYSbWXbNHRCP8IJGx5FItGNoPYpAAKOSs\n7RS1mj2Dw/1iQhWF8ppyT6bFwlSI0EmV8tF4ctoOMOL/nT/oWHs8eS03SAFS\nMLjsJo7kUIQfKKJpwVPtd7La9oUl2cGdr+OP+ZJMZ9pfsXGUVnobGOVmZsfT\n3ALRMg1bsIkrXWkwW7HFo2dvhFJ8pFxo4ho08LbdKAvoKLn0ZB6lN3Nk1ICe\n0ZCtYo9Gp5GK4vsEe192uEBWnjsmlg9Ndt/WjefhgLkyF/OxkhzNHk6QEOil\njv8o3EPhAe3lVe+H2ljkRe41yFh0CoEbaw+JXWMKZQKBJZbaPBr3lvc1D/nq\njMeLAlOKJs+0pSKIXeGFhZe2WwgL+KtxNqT7y36Pe9q3tIC+KHjDg1KwqRmP\nyEKoaQ0eOvxHQk2+s1PYnrN2tBL9ooWr6TzKRzB815gU3zBAb6C7+0WugOwZ\nzqQD\r\n=H5Mr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErKKD5xkH+FMHwZips6+dNymc1IJvOYnx0KpnqMvqU1AiAz1XSeDLkhvVMZwzsffabNyRU1W1zA1oQvwQh2XJPyiw=="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.4.0_1593454665100_0.7030590347326695"},"_hasShrinkwrap":false},"2.5.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.0"},"dependencies":{"query-state-core":"^2.5.0"},"version":"2.5.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^16.8.14","react":"^16.9.0","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"cbc9554bb95e8e40105d8b1d244e3ec4b78832e5","_id":"use-location-state@2.5.0","_nodeVersion":"12.16.3","_npmVersion":"lerna/3.22.1/node@v12.16.3+x64 (darwin)","_npmUser":{"name":"xiel","email":"felix@xiel.de"},"dist":{"integrity":"sha512-Gsn37xXWTVa4gGZA8WobtmC7ixm46TkQUyr9MApLhh9YIDcxOKuLCH/0wuKY7YcrCsb5t/S0b77qP50/mbvibQ==","shasum":"c71e6b5391898fa23ee1a6242d193924db6767c0","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-2.5.0.tgz","fileCount":31,"unpackedSize":52591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmwxBCRA9TVsSAnZWagAAe10QAItvQAev4lt95g3Z/ZwC\ng/OW60rr1EA9xnb8O+6XIQnBFpHnA1DztB3g1p5LhAAkHqsJeJSqyTJxcNK6\ngRpG6Kdmuwf74ipega4c0bE5MC9loaADf64srlcFEy9GbYW1Z4MBw0TTGILl\nUlaK8tK5vu6HIUMx+Hup8vNcg9EKhOJBOTSC/JboyaOSnZh8Gtvx1Of4jAzG\nZUURNtBM+xPx386vNun5eVkFeefquXShJZJo8qx6qsJfTRZnyuCfNBClFnmj\nZ2TpZRUxMpI7InJHWvjPGKWcHqYg7s+xcidcXrZ3njBl3TLMgHiO0R4pd/J4\nxKQ33mahsfwfvyzKGddQkPIqBpXOV0IAkH6l/Vz5R4/Crnv9ddjmmm0PkBkm\nm7ivuRFdJnbHAaWy7ztpm8dL/DWm4wQWYURto6jGtolyk77CBuEDMGTddgdH\nftDydZb9eth3Wx+58GOPWYsf7t5q5DoJmSsq5tybJBTcq4rFZVBbkNUu3gX8\ndre5CUW9/UdKJ1J9K7x1eZgFpAC0GSJy4tmpEFdzSJAI3dz+WQhlTfbRp17h\nM8HyZVyCUQFnecDMcVRCmyOd/tgx8eyKMriACKMYKAUSgNiQkRyprpG47HvB\nJ8XChZlGs3bcV1lUhtRUQCcWJT9cwQx/4qdlkUMgY0PDq3Ng4uB4epAkbPwC\nWZ9Y\r\n=Q6ZP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZiYq41LoEJSOky3s/DXhKrWSek846w2dTK7emVsIBKgIgH+ia07wXOSfV5Hx/F4YsY5zpBFQeKw7x4/e+w4Cz3DM="}]},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_2.5.0_1603996736774_0.5318959484750405"},"_hasShrinkwrap":false},"3.0.0-alpha.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.0"},"dependencies":{"query-state-core":"^3.0.0-alpha.0"},"version":"3.0.0-alpha.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","react":"^16.9.0","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"c5e5bc7193e607556430acfa577b6ffd9b36c69f","readme":"<div style=\"width: 100%; text-align: center;\">\n    <h1>{ useLocationState, useQueryState }</h1>\n</div>\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/use-location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/use-location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/use-location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers [location history](https://developer.mozilla.org/en-US/docs/Web/API/History) using modern hooks\n\n## ✨ Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share the application in a customizable state\n- **`useLocationState(name, defaultValue)`**\n  - restores the latest value after navigation actions (back/forward), by keeping value in `history.state`\n  - supported value types: `string | number | boolean | Date | Array | Object`\n  - handles complex & nested values - all values that can be serialized are supported\n- **`useQueryState(name, defaultValue)`**\n  - restores the latest value from URL (`location.href`) and after navigation actions (back/forward)\n  - supported value types: `string | number | boolean | Date | string[]`\n  - handles stringification and parsing from query string of for supported value types\n  - invalid entries from the query string are discarded and the component will receive the defaultValue instead\n\n<img style=\"display: block; margin: auto;\" src=\"https://repository-images.githubusercontent.com/182417896/058a9d00-e2e1-11e9-8467-8923219ec500\" />\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\n\nUsing **`react-router`** or another popular router? For the best experience install one of the [router integrations](#router-integration-optional).\n\n## Usage\n\n`useLocationState()` and `useQueryState()` work similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook), as they also return the current value and a update function in a tuple `[currentValue, updateValueFn]`.\n\nThe _important difference_ is that **you must pass a name** before your **default value** for your state.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\nconst [priceMax, setPriceMax] = useQueryState('priceMax', 30)\n```\n\n### useLocationState()\n\n`useLocationState()` is perfect, when you want to store a state that should not be reflected in the URL or in case of a complex data structure like a nested object/array.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\n```\n\nThe name you pass, in this case `'commentText'`, will be used as a key when storing the value. So when you use the same name (and default value) in another component, you will get the same state.\n\n```javascript\nsetCommentText('Wow, this works like a charm!')\n```\n\nThe updated state will be restored when the pages reloads and after the user navigated to a new page and comes back using a back/forward action.\n\n### useQueryState()\n\n`useQueryState()` is a great, when you want to store information about the current state of you app in the URL.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\n\nThe name you pass will be used as a parameter name in the query string, when setting a new value:\n\n```javascript\nsetValue('different value')\n```\n\nAfter calling the update function `setValue()` with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button) or by loading the same URL anywhere else.\n\n```javascript\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Push\n\nIn cases where you want the updated state to be represented as a **new entry in the history** you can pass a options object to the set function, with the method property set to `'push'`.\n\n```javascript\nsetValue('a pushed value', { method: 'push' })\n```\n\nThis changes the way this state change is handled when the user navigates. When the user now clicks the Back-Button, this state gets popped and the previous state is restored (instead of eg. navigating away).\n\n### Example\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>\n        Toggle\n      </button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n\n<a href=\"https://codesandbox.io/embed/zqm4o19yrx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\n\n<a href=\"https://codesandbox.io/embed/github/xiel/use-location-state/tree/master/src/examples/use-location-state/?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n## Router Integration (optional)\n\nIn case you want use [`location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location/search) (after the question mark in the url) you need to use one of these extended versions of the package.\n\nWe plan to provide clean and easy-to-use integrations for all popular routers.\nAt the moment we provide integrations for:\n\n### react-router (react-router@^6.0.0)\n\n```bash\nyarn add react-router-use-location-state\n```\n\n```javascript\nimport {\n  useLocationState,\n  useQueryState,\n} from 'react-router-use-location-state'\n```\n\nUsage works the same as described above, except that the URL will look like this now:\n\n```javascript\nhttp://localhost:3000/?itemName=different+value\n```\n\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/react-router-use-location-state?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Edit react-router-use-location-state-example\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### Gatsby & @reach/router\n\nGatsby & Reach Router are supported. Gatsby currently always scrolls up on location (state) changes. To keep the scroll position, when you update location state using the update function of `useLocationState`, add these lines to the **gatsby-browser.js** file in gatsby root folder.\n\n```javascript\n// keeps same scroll pos when history state is pushed/replaced (same location === same position)\n// see: https://www.gatsbyjs.org/docs/browser-apis/#shouldUpdateScroll\nexports.shouldUpdateScroll = ({ routerProps, getSavedScrollPosition }) => {\n  const currentPosition = getSavedScrollPosition(routerProps.location)\n  return currentPosition || true\n}\n```\n\n### More routers soon - work in progress\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/use-location-state/issues).\n\n## Compatibility\n\nTested in current versions Chrome, Firefox, Safari, Edge, and IE11. This library relies on new, yet stable ECMAScript features, so you might need to include a [polyfill](https://www.npmjs.com/package/react-app-polyfill#polyfilling-other-language-features) if you want to support older browsers like IE11:\n\n```javascript\nimport 'react-app-polyfill/ie11'\nimport 'react-app-polyfill/stable'\n```\n","readmeFilename":"README.md","_id":"use-location-state@3.0.0-alpha.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+arm64 (darwin)","dist":{"integrity":"sha512-NaxGcw2DjDtuofiyB480HF9KEms8DQtlcVLLnT8aMO5jHepKNzgLLZWsdzfBZNKhUW37T091XHc5FtuvjLFxzQ==","shasum":"509fbb6d9eee2b1c69600800fa0473cdc51cc549","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.0.0-alpha.0.tgz","fileCount":30,"unpackedSize":51379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC55deWSCT5SuLKW38fRlUdKGLTRPMTWKp+KeJ5EM8jhQIgWcQvrTqNXbnRYAjPRR5wli/imSl24kNy+p4Xu6Y6sHs="}]},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.0.0-alpha.0_1636799107438_0.9446198450521788"},"_hasShrinkwrap":false},"3.0.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.0"},"dependencies":{"query-state-core":"^3.0.0"},"version":"3.0.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","react":"^16.9.0","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"63012655cbfb91201cee2b19537927747ff626a1","_id":"use-location-state@3.0.0","_nodeVersion":"16.13.0","_npmVersion":"lerna/4.0.0/node@v16.13.0+arm64 (darwin)","dist":{"integrity":"sha512-VvnbBfBYrFh2EO8I1j7zbC49xh8fqa6ZGrQIs5oImsKOWdzWW2xqaOzXElFX6MNscJhHzXkN+6HO2mOC7Fs9ZQ==","shasum":"5bc56e700eb6d5dc78bb5dae674238d818a4f0b7","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.0.0.tgz","fileCount":30,"unpackedSize":51363,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSgHXnfVhCEknaGuQmnHtshkleukZbwF3YhXGFrDoWcQIgGYcxAxM7Pdlt8DmD39fECt//jQLtmmA5FG8oPeFmMok="}]},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.0.0_1636802447992_0.39281646289684935"},"_hasShrinkwrap":false},"3.0.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^17.0.2"},"dependencies":{"query-state-core":"^3.0.0"},"version":"3.0.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","react":"^17.0.2","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"5d86b8e4f37e4b7d8822e8490e25d46bfa806686","_id":"use-location-state@3.0.1","_nodeVersion":"17.2.0","_npmVersion":"lerna/4.0.0/node@v17.2.0+arm64 (darwin)","dist":{"integrity":"sha512-mCKv78zq+Tzlrb+T/KMDn0U0amdbOAhcxJCWypybvu1QqorVW3fb4y/1nPfcvgGhGFhAqfOI2uSN8yqzDZP/5A==","shasum":"a7da159b26ca873c2c0f016907a2ff484ca14969","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.0.1.tgz","fileCount":30,"unpackedSize":51467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzebZCRA9TVsSAnZWagAAuVwP/jmFFF8L9fZzOSu4xiB6\nxOIJeN4Xlnbrr3823zWMD5ujFHL0pcO67XI0AHU1SqpwA9uPzIE2yCoxIl9B\nOTisvy5xXz14MbG2DWzDeEDOZiz6azzbrXeMtEKCX/FRLefXu6ZjQMc1xV5x\nioilRC7zSTnUcdml0aHykoUQ7isv9wxM6wqpw8ICFIql9p314UtERC/h4oL6\nxfeT/f6mFZ353kFfE/tcOFcfqfud6ChRtSTE5WTonf8yiALnlKnZ23h0hOJZ\n8v5x1GkeuI2sQP6SBx338umitTNALbbqC9VM08uqGL89GoTHs0CFsfWEJKy4\nE6m/fA/k5HmAg/HCGVbNlAH9mhkyzYz9cRqbQGdJIO6PVB65Tz4VeclEKVUm\nSJIAMBW31o2Vzgo011jktuiPkHk3rc6iRTAP/JITzDNVbYHjq3g4rYzDU4eY\nLk93D07AoeicbRNPmqXBOOv3ua8c1sTrJ+0VvrAenQhKU8Ll815pBVtbmZii\ncsb332c/WPEnRZBY13El6Szmcy+vtbbA5n8YE2M72uW/lqN8ZQyiUfsmJGH+\nOmvT14UPWK3MF7tviKwZuy6sDPD2yV0PLM/QQT6rrXRhPV4NVgKSUcus2Wc/\nzUxV78MLo79Ek80et9bkcxEpqsQ2ebXmlzT18v3uvto+q2VnFAsR4lUoIF7E\nWU2D\r\n=x9hY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0riBWgeIeX+2x75tkxFV4ghVTifvxB6Ussp14DbB8FAiEA5oOGfRL087YmtV6X317UgKSPoDPBoF8X3huQfcB8iLw="}]},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.0.1_1640883928960_0.008557399764506535"},"_hasShrinkwrap":false},"3.0.2":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","peerDependencies":{"react":"^16.8.0 || ^17.0.2"},"dependencies":{"query-state-core":"^3.0.0"},"version":"3.0.2","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","react":"^17.0.2","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"52073b1e24318829187ca834369ea5bb9ba14684","_id":"use-location-state@3.0.2","_nodeVersion":"17.2.0","_npmVersion":"lerna/4.0.0/node@v17.2.0+arm64 (darwin)","dist":{"integrity":"sha512-FJyq9wJp93x5HQm1g37DQp/I8GgLnzNKGoempdAEgkwAOsbzHWFyWV6QfcpW/fBeWm0sWUymWr2+9ZxoYeC5lw==","shasum":"dde45d50afddb07f270c702c048d9edc2c222663","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.0.2.tgz","fileCount":30,"unpackedSize":51478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1JpwCRA9TVsSAnZWagAAHcUP/3R20RsI7T/5D8vOZZnd\nAblc0cA4Ab0TUBn4JUN0ZQAAEdYduQssvnbmY0b6CC0ZnPJ9zQOXMocrZMGD\nKl643VU+o3nssGpRXMcvZLYvqxQ3iw43WIghqWsyyKjdHdYXQmY2FV302k5q\nRgA5b6oHWqb6wU8YpzI8JJW/r4FqvIXRcFls8xKfRKD5r+WKmrFBGGMCFxTd\n5mfFDiQjhs2a1pAqwe3q1K4z5gigbmkJDRQWjuGj5+Rl2F7ZMt/AJu8Agbs+\n96aBFvfDERUsuzT+kJADdVTVJFQ92IIZkQ1ecfKy4zvFJCoQ0d0NcgXuRo83\n8ab7pLsj9y5cr7DyNiSC1BGz1xUC/0/d6ZPv1KwEOqeOS/kFvpiD7xP5Z1oF\nM2OCeL2G5mpL673/UQZOdMdkvBRhT8u0BVHXcSQzm0Zz+92oit91dlujd48P\nTQSGbxYLvKcuNbnWVU9qRTeZU1al2zJUgVImmTnHAR8KbntVEweRFUGLuoOe\nmZTnpISlCZvz2vE4w0yoZ8FgOIslTdgsLsLnz3FV+yKTln750whjwSxd2HvP\neMDidWQ4aJQFWOal1QsKovEQQW271t7X3YLz4S9qDTmTWhMZMi11OlAXkfLP\nZzpIj4LfP5noyzEUwX4u3p4+SlSyXWQQ41+yFaVsr/wiKT2X0tPN34SQGAHl\n/Bcy\r\n=gTBO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDlpgipDMRn2kekTW9iynqSqw0Faktr0Sj/Vnu8GqfhxAiEA16Xuep8ZpL0NhPcV+dtZvffWMrKUhuty2H+av/DRZ2U="}]},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.0.2_1641323120303_0.10702215056211761"},"_hasShrinkwrap":false},"3.1.0":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","exports":{".":{"import":"dist/use-location-state.esm.js","default":"dist/use-location-state.cjs.js"},"./next":{"import":"dist/next.esm.js","default":"dist/next.cjs.js"}},"peerDependencies":{"next":"*","react":"^16.8.0 || ^17.0.2 || ^18.0.0"},"dependencies":{"query-state-core":"^3.1.0"},"version":"3.1.0","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","next-router-mock":"^0.7.4","react":"^17.0.2","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"e5443178d608b56096f8ec746738c1d2bc21fd3b","_id":"use-location-state@3.1.0","_nodeVersion":"18.6.0","_npmVersion":"lerna/5.5.2/node@v18.6.0+arm64 (darwin)","dist":{"integrity":"sha512-XUJzKmUQm2bOEga0z/SPZLqxkrqLN5HmbWz4yR3uIrBhzpN//FRQ2fx5vjBv6r3AhmrC3oYHcaRgQJ83+WzzTQ==","shasum":"6ead104a57a2d0b5d23b5c5118f351838a0ce74d","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.1.0.tgz","fileCount":24,"unpackedSize":90985,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkl4/j0L/smq2giQ9Svl4gDZuSg1j1YyqamJfvlmEpEgIgDr6EokGEn8iJ3WCGHBNaJCa92eVIIAeAzauYirQWwsc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLaHsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIYBAAgHizyZVvQyWioSzv34lJ+ClI+5oBga6k4LnMsbHdBhW7g/8+\r\numIvXuZu345iq+srOwdufKa+S6DwDPEdGvG1JHry4WKgCuGtfS6bd4dApaXy\r\n/0wC3aXE8NVYmHmQIYbYpTkgMuHEOWOAHLukcpigCrgWwd0QxdFvB2QfUY8K\r\ntoV/81NONFW58SUBvMdiWApnZP9bl6iesG2Tp9x/C6QyXEXpWree0BcGH6V9\r\nacgv7UHNTQZRF+oXOpLWxHnGTclszi9xR6tYMOm0unU3JFMI9sE2ER5kLjgs\r\nHK4OdT1QnZbcncw70viu0+HEqjgt9Pf+Aj5bvXHvLqijs4chebYfW5rgEdN7\r\n1r4Elde/wsRbMcXYkMPYQhlsPOCpozkXQvuTBRlioGcSRW9o9PkVCYZO+SQC\r\nnmv99gIFl9BQdqJ2gwFPbON+0DQAwLBGBYQEOtMSuMY/Lt3sCRvrybvvOPIP\r\nfhKZf2/+Lrw7qOGfPAWaPG48j4ezu5dMBLWexxc8g7zJjWoWeQPXMUJ81sUr\r\n426PZIcWFzKQmP23DguTzuhtAQoffFZxsHQcg/ZrQxG2i2HCPHVStvjPHXTR\r\nDri8s8QVYTihN9E6qsgfL9k0k1MzP63G6e5mkELiCfLCNK2tdtZoLPst7m6n\r\nU877vBEeGxrolQGxAUl3LSsOEAKquv/hdV8=\r\n=e6Om\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.1.0_1663934956424_0.3781986299683313"},"_hasShrinkwrap":false},"3.1.1":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","exports":{".":{"import":"./dist/use-location-state.esm.js","types":"./dist/use-location-state.d.ts","default":"./dist/use-location-state.cjs.js"},"./next":{"import":"./dist/next.esm.js","types":"./dist/next.d.ts","default":"./dist/next.cjs.js"}},"peerDependencies":{"next":"*","react":"^16.8.0 || ^17.0.2 || ^18.0.0"},"dependencies":{"query-state-core":"^3.1.0"},"version":"3.1.1","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","next-router-mock":"^0.7.4","react":"^17.0.2","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"dfdfe04b543e4f8aa3f896a3497a9ec80de6222d","_id":"use-location-state@3.1.1","_nodeVersion":"18.6.0","_npmVersion":"lerna/5.5.2/node@v18.6.0+arm64 (darwin)","dist":{"integrity":"sha512-ClVKAKMSxQJncCmHGTSig5cqjyNKT2BrDcSKzyjxKHdmcBe0+AN3jmdq94OZtXBl4n/dzzzFo1PdPQekKB6BEg==","shasum":"66269be4d745c99689a43d73f36a5a467ce7f5bf","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.1.1.tgz","fileCount":24,"unpackedSize":91077,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLY9OvU36mXgix9Eah6XQ3Qe/OGteWgUWSlVDmNz3gHAIhAJwLk4q4LUqmDUX1pARxB3WRhQTW7IPEU/JXP5pBmEfX"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLaTDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvHxAAobQU1R0kXfkSqXoUgN9QlcsEQqNvmuu8/T1c6hXlDLYf2pr8\r\nnWYkLR46wYECUtXCOXxv9P1QK5Ki6RFKrVBwYzYDteTSzluXqdx6+HkXI2uA\r\nrpTFzAmrdiDtg96RyQRjIxwE8TkTb2LdzTgo+1qP+1tyT9arU+l2++UcFGyC\r\n2KDlLJ80uAG0SxwiH2RBdH6HMIaIGLKiHtyLrZpjUCRsmjB0kTxcdbNC9b6l\r\nVOCQEc0/g6WayS6ws5V3Ii5OcGjfmX7nI2ugj3nkNZCgw3UIypwmHs6JHK5H\r\nZAW7apI/LY65/UD0/nSZtpVUePfPumPx9C3j+dhxwUffLB4agD3mySA9cZ65\r\nKUEIXdKSUyPP2AYkHajv65JKcDSXKZ3PIbHkQj/95yLrWIBiT7Iwl2Bmozz4\r\nkrn2YWoaI2HFwCWZ1qv6x8NMnQQ52Ot84bHNYSO6oravlWpHuKNydQXEQwqR\r\nOGNAkuVvGhC7PEhXZA0jsdQwui1/1FIh7KwcRznn2cV3PPkFSf/UwXqjAaXd\r\nh0pEF93xkpPTxWzKHhz6NmR6Q6vWCz9Si3LlW/jqH0rQW7zLahQ+yivjCf3J\r\nz2fh9jH1a04OGjDY68+N7B9bupSQHlFLyDmcf2I6cKacsmQiS8+3PJwecNG7\r\n8W4wDr2/P/u60hvQLVYjwWlxz+1JabUORXg=\r\n=re8b\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.1.1_1663935683141_0.7413329006115772"},"_hasShrinkwrap":false},"3.1.2":{"name":"use-location-state","main":"dist/use-location-state.cjs.js","module":"dist/use-location-state.esm.js","types":"dist/use-location-state.d.ts","description":"react hook to the browsers location query state","exports":{".":{"import":"./dist/use-location-state.esm.js","types":"./dist/use-location-state.d.ts","default":"./dist/use-location-state.cjs.js"},"./next":{"import":"./dist/next.esm.js","types":"./dist/next.d.ts","default":"./dist/next.cjs.js"}},"peerDependencies":{"@types/react":"^16.8.0 || ^17.0.2 || ^18.0.0","next":"*","react":"^16.8.0 || ^17.0.2 || ^18.0.0"},"dependencies":{"query-state-core":"^3.1.0"},"version":"3.1.2","author":{"name":"Felix Leupold","email":"felix@xiel.de"},"homepage":"https://github.com/xiel/use-location-state","license":"MIT","devDependencies":{"@types/react":"^17.0.5","next-router-mock":"^0.8.0","react":"^17.0.2","rollup":">=2.0.0","rollup-plugin-typescript2":">=0.26.0","tslib":"*","typescript":"*"},"repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"scripts":{"cleanup":"rm -rf dist && rm -rf .rpt2_cache && rm -rf node_modules/.cache","build":"yarn cleanup; rollup -c","dev":"rollup -c -w","test":"echo \"Error: run tests from root\" && exit 1"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"gitHead":"2e8984f67392a50b2cc0950aea65d667e499ea36","_id":"use-location-state@3.1.2","_nodeVersion":"18.12.1","_npmVersion":"lerna/6.0.3/node@v18.12.1+arm64 (darwin)","dist":{"integrity":"sha512-zHZMRkFhswmMuEnSaqYKfTT13i7WIPJWyVGt+/wiVW8lna5MaLIq0uV9+oG5ZJ+oG1BooO0NsE2lJHJfzbfZpA==","shasum":"5ce8229824be345d037de0e7e2f07611d4f3dff5","tarball":"https://registry.npmjs.org/use-location-state/-/use-location-state-3.1.2.tgz","fileCount":24,"unpackedSize":93366,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyqBo60EODUJnUvHYpBPpGDFY5p4xu/E2oBDYbCgIWNAIgYmVa7G1t7EnU2anFnw5qK5Px16sq6U0kz47UfNeE7a0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdOYLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSEQ/8DM3VgRHibkrksfVtrToiyHMpCMB4XoI9qZ/YC05aq8hogFih\r\nuhgaFVRwdpul8qvp5ERGSUe0bzwR/d08+6mwld/07/ton5ie1+eDys1mbo8d\r\nZSnabHCEANivgqFQIDpMNa/xH1oQMTIyqZhlRlnVxBa+Sny3WSaypQFIuxQ1\r\n9shtADxwnqpAHdk8QM7bkEwqduE7TwYY9fF12MGiPlmJ56lZHauz+z2ta3Nr\r\nZz7CgFgNct3o8O+bnu8ddpodU0C+nlLl09E6EPPwzAUVUYuE5QDTr59P9ZoV\r\nfw1lt+pVfnU2RoOm/oCtQdiCdT84HJ8uyyBFOpLQfK4F0yF8jsnALGcvbLT7\r\nq40Dgb4H9lnkRZdeAwBHeM8pM9i8V88QKk3X4Nssp5SCUT3ZcgnlhOwZyFXp\r\nhQofAnuqZ5Us3LeWFd5/G97Ll/7MCLugzMhOD2p5lv7hLnKAt6DuTBTmW5sD\r\nta+jiwjrTAup8Nx0K1pkfyQJqj77bsyg9Lv6y9ZPMklZtoHuCQLDVH2VQk3L\r\nibuaQKzpM2Xkz3oLiQgyvzxYxvTsryE9/KY2MpXgp5JodxJRGhDVXaqYgCRi\r\nzS0oP0D47sXzi7IWnNy9doz7NY1mYHXLEslzHedUJAR/0RXXbzrdPGXgvg79\r\nnXu9T4TTLEpbmfG0y+TSq5u7I0E0K9DJUyE=\r\n=845M\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"xiel","email":"felix@xiel.de"},"directories":{},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-location-state_3.1.2_1668605451388_0.28017080664864724"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-20T22:49:26.385Z","0.0.1-alpha.2":"2019-04-20T22:49:26.498Z","modified":"2022-11-16T13:30:51.735Z","0.0.1-alpha.1":"2019-04-21T08:50:41.932Z","0.1.2":"2019-04-21T22:19:02.395Z","1.0.0":"2019-04-23T14:38:03.814Z","1.0.1-next.2":"2019-04-23T15:00:21.521Z","1.0.2":"2019-04-23T15:03:39.815Z","2.0.0-beta.0":"2019-04-25T22:11:16.802Z","2.0.0-beta.1":"2019-04-26T07:20:45.686Z","2.0.0-beta.2":"2019-04-26T07:51:26.201Z","2.0.0-beta.3":"2019-04-29T00:25:25.569Z","2.0.0-beta.4":"2019-04-29T11:59:13.715Z","2.0.0-beta.5":"2019-04-29T21:28:22.091Z","2.0.1-alpha.0":"2019-04-30T07:53:19.651Z","2.0.0":"2019-04-30T08:07:03.099Z","2.0.1":"2019-04-30T11:51:41.739Z","2.1.0":"2019-06-07T17:49:14.151Z","2.1.1":"2019-06-07T22:33:35.757Z","2.1.2":"2019-06-08T10:43:13.692Z","2.1.3":"2019-08-05T21:34:25.286Z","2.1.4-alpha.0":"2019-08-05T21:46:58.278Z","2.1.4":"2019-08-05T21:57:36.246Z","2.1.5":"2019-08-06T20:10:13.321Z","2.2.0":"2019-09-16T19:03:13.819Z","2.3.0":"2019-09-19T12:18:33.564Z","2.3.1":"2019-10-08T20:44:33.376Z","2.4.0":"2020-06-29T18:17:45.288Z","2.5.0":"2020-10-29T18:38:56.898Z","3.0.0-alpha.0":"2021-11-13T10:25:07.608Z","3.0.0":"2021-11-13T11:20:48.124Z","3.0.1":"2021-12-30T17:05:29.098Z","3.0.2":"2022-01-04T19:05:20.504Z","3.1.0":"2022-09-23T12:09:16.644Z","3.1.1":"2022-09-23T12:21:23.488Z","3.1.2":"2022-11-16T13:30:51.568Z"},"maintainers":[{"name":"xiel","email":"felix@xiel.de"}],"description":"react hook to the browsers location query state","homepage":"https://github.com/xiel/use-location-state","repository":{"type":"git","url":"git+https://github.com/xiel/use-location-state.git"},"author":{"name":"Felix Leupold","email":"felix@xiel.de"},"bugs":{"url":"https://github.com/xiel/use-location-state/issues"},"license":"MIT","readme":"<div style=\"width: 100%; text-align: center;\">\n    <h1>{ useLocationState, useQueryState }</h1>\n</div>\n\n[![npm (tag)](https://img.shields.io/npm/v/use-location-state/latest.svg)](https://www.npmjs.com/package/use-location-state)\n[![codecov badge](https://img.shields.io/codecov/c/github/xiel/use-location-state/master.svg?color=hotpink)](https://codecov.io/gh/xiel/use-location-state)\n![GitHub top language](https://img.shields.io/github/languages/top/xiel/use-location-state.svg)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\nstore and retrieve state into/from the browsers [location history](https://developer.mozilla.org/en-US/docs/Web/API/History) using modern hooks\n\n## ✨ Features\n\n- makes it easy to provide a nice UX to your users, by restoring part of the app state after navigation actions\n- makes it easy to share the application in a customizable state\n- **`useLocationState(name, defaultValue)`**\n  - restores the latest value after navigation actions (back/forward), by keeping value in `history.state`\n  - supported value types: `string | number | boolean | Date | Array | Object`\n  - handles complex & nested values - all values that can be serialized are supported\n- **`useQueryState(name, defaultValue)`**\n  - restores the latest value from URL (`location.href`) and after navigation actions (back/forward)\n  - supported value types: `string | number | boolean | Date | string[]`\n  - handles stringification and parsing from query string of for supported value types\n  - invalid entries from the query string are discarded and the component will receive the defaultValue instead\n\n<img alt=\"\" style=\"display: block; margin: auto;\" src=\"https://repository-images.githubusercontent.com/182417896/058a9d00-e2e1-11e9-8467-8923219ec500\" />\n\n## Installation\n\n```bash\nyarn add use-location-state\n```\n\nUsing **`react-router`** or another popular router? For the best experience install one of the [router integrations](#router-integration-optional).\n\n## Usage\n\n`useLocationState()` and `useQueryState()` work similar to the `useState()` [hook](https://reactjs.org/docs/hooks-overview.html#state-hook), as they also return the current value and a update function in a tuple `[currentValue, updateValueFn]`.\n\nThe _important difference_ is that **you must pass a name** before your **default value** for your state.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\nconst [priceMax, setPriceMax] = useQueryState('priceMax', 30)\n```\n\nThe `defaultValue` works as a fallback and is returned when there is no value in the query or location state for this parameter.\n\nThe `defaultValue` can not be changed after the first render, so that same url always provides the same state.\n\n### useLocationState()\n\n`useLocationState()` is perfect, when you want to store a state that should not be reflected in the URL or in case of a complex data structure like a nested object/array.\n\n```javascript\nconst [commentText, setCommentText] = useLocationState('commentText', '')\n```\n\nThe name you pass, in this case `'commentText'`, will be used as a key when storing the value. So when you use the same name (and default value) in another component, you will get the same state.\n\n```javascript\nsetCommentText('Wow, this works like a charm!')\n```\n\nThe updated state will be restored when the pages reloads and after the user navigated to a new page and comes back using a back/forward action.\n\n### useQueryState()\n\n`useQueryState()` is a great, when you want to store information about the current state of you app in the URL.\n\n```javascript\nconst [value, setValue] = useQueryState('itemName', 'default value')\n```\n\nThe name you pass will be used as a parameter name in the query string, when setting a new value:\n\n```javascript\nsetValue('different value')\n```\n\nAfter calling the update function `setValue()` with a new value, the state will be saved withing the query string of the browser, so that the new state is reproducable after reloads or history navigation (using forward / back button) or by loading the same URL anywhere else.\n\n```\nhttp://localhost:3000/#itemName=different+value\n```\n\nuseQueryState() uses the browsers `location.hash` property by default.\nCheck out the router integrations to use `location.search` instead.\n\n### Push\n\nIn cases where you want the updated state to be represented as a **new entry in the history** you can pass a options object to the set function, with the method property set to `'push'`.\n\n```javascript\nsetValue('a pushed value', { method: 'push' })\n```\n\nThis changes the way this state change is handled when the user navigates. When the user now clicks the Back-Button, this state gets popped and the previous state is restored (instead of eg. navigating away).\n\n### Example\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [active, setActive] = useQueryState('active', true)\n  return (\n    <div>\n      <button type=\"button\" onClick={() => setActive(!active)}>\n        Toggle\n      </button>\n      {active && <p>Some active content</p>}\n    </div>\n  )\n}\n```\n\n<a href=\"https://codesandbox.io/s/use-location-state-demo-49n1kw\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### Example with multiple useQueryState hooks in one component\n\n```javascript\nimport { useQueryState } from 'use-location-state'\n\nfunction MyComponent() {\n  const [name, setName] = useQueryState('name', 'Sarah')\n  const [age, setAge] = useQueryState('age', 25)\n  const [active, setActive] = useQueryState('active', false)\n  // ...\n}\n```\n\n<a href=\"https://codesandbox.io/embed/github/xiel/use-location-state/tree/master/src/examples/use-location-state/?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n## Router Integration (optional)\n\nIn case you want use [`location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location/search) (after the question mark in the url) you need to use one of these extended versions of the package.\n\nWe plan to provide clean and easy-to-use integrations for all popular routers.\nAt the moment we provide integrations for:\n\n### Next.js\n\nImport from `use-location-state/next` to use the router build into Next.js, which enables you to use the query state also during **SSR**.\n\n```javascript\nimport { useQueryState } from 'use-location-state/next'\n\nexport { getServerSideProps } from 'use-location-state/next' // [1]\n\nexport default function Page() {\n  const [count, setCount] = useQueryState('count', 0)\n  //...\n}\n```\n\n[1] Page must be server rendered (SRR), otherwise React warns about a hydration mismatch, when your initial rendering depends on the query state. Export your own `getServerSideProps` function or the provided empty one.\n\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/nextjs?file=/pages/index.tsx\">\n  <img width=\"150\" alt=\"Example in CodeSandbox\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### react-router (react-router@^6.0.0)\n\nInstall & import the package for react-router\n\n```bash\nyarn add react-router-use-location-state\n```\n\n```javascript\nimport {\n  useLocationState,\n  useQueryState,\n} from 'react-router-use-location-state'\n```\n\nUsage works the same as described above, except that the URL will look like this now:\n\n```\nhttp://localhost:3000/?itemName=different+value\n```\n\n<a href=\"https://codesandbox.io/s/github/xiel/use-location-state/tree/master/src/examples/react-router-use-location-state?fontsize=14&module=%2Fsrc%2Fpages%2FQueryStateDemo.tsx\">\n  <img width=\"150\" alt=\"Edit react-router-use-location-state-example\" src=\"https://codesandbox.io/static/img/play-codesandbox.svg\">\n</a>\n\n### Gatsby & @reach/router\n\nGatsby & Reach Router are supported. Gatsby currently always scrolls up on location (state) changes. To keep the scroll position, when you update location state using the update function of `useLocationState`, add these lines to the **gatsby-browser.js** file in gatsby root folder.\n\n```javascript\n// keeps same scroll pos when history state is pushed/replaced (same location === same position)\n// see: https://www.gatsbyjs.org/docs/browser-apis/#shouldUpdateScroll\nexports.shouldUpdateScroll = ({ routerProps, getSavedScrollPosition }) => {\n  const currentPosition = getSavedScrollPosition(routerProps.location)\n  return currentPosition || true\n}\n```\n\n### More routers soon - work in progress\n\nYour favorite router is missing? Feel free to [suggest a router](https://github.com/xiel/use-location-state/issues).\n\n## Compatibility\n\nTested in current versions Chrome, Firefox, Safari, Edge, and IE11. This library relies on new, yet stable ECMAScript features, so you might need to include a [polyfill](https://www.npmjs.com/package/react-app-polyfill#polyfilling-other-language-features) if you want to support older browsers like IE11:\n\n```javascript\nimport 'react-app-polyfill/ie11'\nimport 'react-app-polyfill/stable'\n```\n","readmeFilename":"README.md"}