{"_id":"state-hooks","_rev":"7-8d01e673c99bcb6a589266702be92b4e","name":"state-hooks","dist-tags":{"latest":"3.0.1"},"versions":{"0.0.0":{"name":"state-hooks","version":"0.0.0","_id":"state-hooks@0.0.0","dist":{"shasum":"b422c47895e723335c69e94d8f5f8afddda13bbb","integrity":"sha512-wZxKdgEZDRd68z/bPmh1pd66tMAXrv2pT6i3Ht4Jcygx/9ddPoiugYzx4BJO5/6uArRdTueLMVThTvrkae38nQ==","tarball":"https://registry.npmjs.org/state-hooks/-/state-hooks-0.0.0.tgz","fileCount":2,"unpackedSize":54,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnbUWCRA9TVsSAnZWagAAZAQP/0RMuUBldFXa7Z17wyA+\ng/e1W+9pEAq8zZHvc0BY/eK7tOlGevw1nFSAg18KB+FxDkr20piQkbufdprx\nTYGM9UJrd33Ekg3ztp2Sy8FWHIQB417b8nPolzAEyUhb432Ck/0wsvz1Lhwn\nPZyvjFo3GwPBGoAZULD4TD143SqI45IK1oCfELfMgGYzd3Y4Cm8s6setjCsX\no2ZcshULnO0QYG78k623bIXVea0Rk6vGVAH/JS8Na2peqfbBu+2J4dn8IhcV\nA2smgfp7VyjkXjn5vfYrZwiMsJn82dwWMDVKkF5h+a1A93QauTMSsQTJ+tdh\ndgwoBc+t7rs6dkwBKfcQD8qi0646+S5vzzEmfJOk9JSZHYs5r4nQtranKqGh\nnN0jMIbH0EvJkf/yjRmkpJn8RsGmgn5UhymbM4RotTlPNcT/Z8WwCEi5kLwF\nKOat9mTn8Kz1FB+WfwDu8bN5Dz5FY7hgWwh+9MCM1v2FbxoFdJiqiDd+6MUU\nqPDWMtxQpi+cBu3pBYIPmqlfxEV/DyaQXRV4RTsXgeqGUQndqUty8GE2BLcZ\nPokB97w6nCDwz+yu5ioNv3ezylOj91/E1wHjynstXpnyljaAMGM5gacCem/W\nVMrNlp+E1AdYmq8kC/euPl9ZvO6GaQSbTX1bw+9WFH5J9vMDXks1LvsS1+yh\nT/Xd\r\n=soBS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB0YRTFZ4CAg0GDQM8ihoTaklDBgOFy/E8z7jtXi6fd+AiBSrbrL864dBKojk5ovTkBGGqz1KEgGqKcRb+ruSsi9kw=="}]},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"_npmUser":{"name":"kripod","email":"kripod@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-hooks_0.0.0_1570616597772_0.4843872939586875"},"_hasShrinkwrap":false,"deprecated":"This version has been deprecated."},"2.0.0":{"name":"state-hooks","description":"Essential set of React Hooks for convenient state management.","version":"2.0.0","license":"MIT","pika":true,"sideEffects":false,"keywords":["react","hooks","react-hooks","essential","state-management"],"repository":{"type":"git","url":"git+https://github.com/kripod/react-hooks.git"},"dependencies":{},"peerDependencies":{"react":">=16.8"},"devDependencies":{"typescript":"^3.6.4"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","bugs":{"url":"https://github.com/kripod/react-hooks/issues"},"homepage":"https://github.com/kripod/react-hooks#readme","_id":"state-hooks@2.0.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-umLOgbwjUykxCsB+TDFVjdQzlhVeTkyZBYP6+EfJgpBSq8kOhuqpc1+QrjsciLI3KuiRk2IAAW9yvA0g8hTEGQ==","shasum":"9bacadffdb2e51e74c02ab0c35004b0501b982ef","tarball":"https://registry.npmjs.org/state-hooks/-/state-hooks-2.0.0.tgz","fileCount":27,"unpackedSize":56389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdo0ReCRA9TVsSAnZWagAAj7UQAJLXe0n1BG6xQvt30UnR\nFmAANAFwvh5Rm5xXFhbRxf9GIiHeorPXJNOLwwmeWA2EBc9469sI1gZmhYnw\nZUU1aC86XH2HjVI7I46oRPRRQ3AI0qElMbemUcfxXiZUVsZGKKErM1uXpQAT\nUtJh+e5OmwdnngVt4fzfYi5fysEABS4RMd1KfYcJtZXc9ryXot+MLQ39MKU0\nJZSBXoJUkj/D4R6SZNpjs1k43UackwpXdVqOkkvekZMK9LTNwsidX+RFEs96\nupqIxIXqZBh8p0FdthxT+nqtJQK8Kvt1Ja3wAqdKqB9r/m20qxTsUE4e05SV\n0GG2N2dMWmLGh2QTMNisrny4Th6MNJzgf02q9BWNpySiMSsVBVeLxzIQ5rQf\nMWqpEcZrqRUiUi6fz4ekigtU1xizIsqGMLPq4c3YBncW8561Ql/wzCfAupgs\nXILfRyN9NH40MESyHLJP5ebGN+/69k1zToxHuaaGtmyfjqWcyNze3Zux42TL\nqOXTDMZ7rC9ETWMJ/hXtnDSabAuTpcjAljXzhP5EzYg1LU2ezZut4qzneLQm\n8WQrjyuTfcHxIg8cBbeGV/GKD0KHYd32Sj898PH7Bh3XjShUuL2BFZJFqrhz\nC52fP+laYdCtM49Uptb0ACKMxXHtKD3SlTdffSfRPXONamcUvI0lUalSPQA1\nNkmt\r\n=/0lu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDy4lIJEtRqBxTyhU86hvXMBEIU8IkdYVgKDIVvwoPFXQIhAKYmhnwXy+MvHb4I9OVzD7aaAMNbzXYB+PuuQJPOEkag"}]},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"_npmUser":{"name":"kripod","email":"kripod@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-hooks_2.0.0_1570980957621_0.7873438923440113"},"_hasShrinkwrap":false},"2.0.1":{"name":"state-hooks","description":"Essential set of React Hooks for convenient state management.","version":"2.0.1","license":"MIT","pika":true,"sideEffects":false,"keywords":["react","hooks","react-hooks","essential","state-management"],"repository":{"type":"git","url":"git+https://github.com/kripod/react-hooks.git"},"dependencies":{},"peerDependencies":{"react":">=16.8"},"devDependencies":{"typescript":"^3.6.4"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","bugs":{"url":"https://github.com/kripod/react-hooks/issues"},"homepage":"https://github.com/kripod/react-hooks#readme","_id":"state-hooks@2.0.1","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-f23mCR41BCqWH88eGCFWUXdiLwG65HCGSvUVxvc6lznO89vBw/ayPWC9o+dteM+dqBVBdPfNnYJxMXQVCgFhyQ==","shasum":"ef8d6ad194301f305dc175537679c2ce1ee265e1","tarball":"https://registry.npmjs.org/state-hooks/-/state-hooks-2.0.1.tgz","fileCount":27,"unpackedSize":56552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp1QcCRA9TVsSAnZWagAAuv8P+QDKCqoLQVjPDJ/sCqJ4\nksKlUFfGKGKm3E1OU6GPiqeiF2+umS30ZjGZ4hJBNu004WoegFsc6HXOlI21\nBAxfr9bpBRlu6e4RQR4LeTx105BtpDOc6jf40ORAqsBTWQRYd+5H0/LNozAB\nGAa8LFJxht84q54aViYSywwIdjICQdMPPTIXY0a+6hT1xvRk39FEdqVtB2jf\ngApdNkuKqiqlIwf9HocuN50FLWWdurkclLG5rJqMd9tgHB63w14leTUn5NbI\njvC3hNk14vP+9rzFM3loqJoijW3O0dwUMgeSu/YCu8DoVY7s9B0cT1gIcPE0\npxwbApqFB/K4Xo5wRuJ/akpwiqiDFroCxKe1Rk7qPO66TtffrlD1fE9QlHxs\ndq3V2jyrF/6+2mvjhePHZrFqvJ1XaffByDJlNq/9tg1KBK0nT+4cIkdb/PLU\nk/eH75kpkvn+jCE2pKy6ZMQuxeEXEObVWkDJ7r4uQiw69ZHzg52Wn9ry/tdw\nK8YPsMAOOmP1SO2uWqi1iNq7zMrUg1dzGimWbmbnGIWrOoMCfyPbK3+Z/ABs\nB2nyqXww1ZwmA4niPTYSaP8/chTMQQm7AQfMNgINPoO5iqYe4h/7yGyzqqrW\ndnBTty4XatRDAyTYzzehv+dEZCOgxlzacPiQ5QvS7n5pfsMxDQwoJpUhb1r5\n2CkW\r\n=9fER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6FIc8z6ynQIRqB2e4VXJmDGgXSZti6HESrGtKKhz90wIgcJO61OcRzOLzREIkLx8VOTmJwCA84dwog6Gejs2Kw1Y="}]},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"_npmUser":{"name":"kripod","email":"kripod@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-hooks_2.0.1_1571247131775_0.45333358762272224"},"_hasShrinkwrap":false},"2.1.0":{"name":"state-hooks","description":"Essential set of React Hooks for convenient state management.","version":"2.1.0","license":"MIT","pika":true,"sideEffects":false,"keywords":["react","hooks","react-hooks","essential","state-management"],"repository":{"type":"git","url":"git+https://github.com/kripod/react-hooks.git"},"dependencies":{},"peerDependencies":{"react":">=16.8"},"devDependencies":{"typescript":"^3.6.4"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","bugs":{"url":"https://github.com/kripod/react-hooks/issues"},"homepage":"https://github.com/kripod/react-hooks#readme","_id":"state-hooks@2.1.0","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-TOqF1rIelos3pW/XrEpNfEPuIT9m0db5F+AFjgGvHhuEaBUSPa8ZpvIaUNwzWMk7jgQoPUmkr3j/f+r2gmRF9A==","shasum":"16d8a354fb2282c396c23e95f674c4d1f0f55355","tarball":"https://registry.npmjs.org/state-hooks/-/state-hooks-2.1.0.tgz","fileCount":22,"unpackedSize":57439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtMdcCRA9TVsSAnZWagAABBcP+wTbSs5YtDv2dD8/wM/A\nm/u4zylsqa0dYQT8zNxBnhHjsqU8L+Oxmyi4bePYdEbwbCIIxKRYIEdnOzuy\n1SfyBaxglUkl6shEHVhzfwT4/KrVBMfFohz3NQ7JDrOkgYH67xwAU35jbgB+\n2zqLOZ7tFARFYLWtHlxxjJFySvTNncOzUDIRYo+UMjAGNhdv19eOxnITBtOQ\nMwoxpv9O+iMXvkF8obhpjFicfNsQf1rML3+QU7y/fwbTJlhj7DCh0gbiLRLM\nu9i4ycHmlkHl9cFpTH7pmcMcvqE6XDX3o5uQC45CLFxYFlv1UWiFNClnn4Xm\n6Xj8wTGl2N0nI1Q8hg41E9W0xrM4+7owSEN+zoaMp94cjscTB17EKaQtaVgx\ns+VMOYX/aob0szgPjVn6OgA+JlpJlWkXA8Jg/i8+b56W69TWvgmS3fFbCKr/\no8yWxGMVidEqG1c8xilXNbXz7McZ/mJMdhd8gIV18wep6w35YT54ZFfZMVpP\n9kSBDYB6ycga++99/aynsZc7wuGxcNxxhq/NKQPcXPLzlXFw/Ci/LsM6BwmN\n/qUrrSM8jcei4VVWjo32eVYjgnH7ctweqcFsn25UzfscDIq0z2Bcr+YU9M4+\naPg3vhx9tJZ0ExW64ch8SyzBni1yvy+OhjpKxkcnmk36nc2ubFaPxU3pSqRN\nv6Dk\r\n=1ZZL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJWyBKQZek/NNFhiervXhGsmhhZgu5o35GW4cspE/8qQIhAIyGEgj91hGHFLNAf9b5Z8uhNiSTivclAery7iLuqIQv"}]},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"_npmUser":{"name":"kripod","email":"kripod@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-hooks_2.1.0_1572128604340_0.7305279781356426"},"_hasShrinkwrap":false},"3.0.0":{"name":"state-hooks","description":"Essential set of React Hooks for convenient state management.","version":"3.0.0","license":"MIT","pika":true,"sideEffects":false,"keywords":["react","hooks","react-hooks","essential","state-management"],"repository":{"type":"git","url":"git+https://github.com/kripod/react-hooks.git","directory":"packages/state-hooks"},"dependencies":{},"peerDependencies":{"react":">=16.8"},"devDependencies":{"typescript":"^3.8.3"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","bugs":{"url":"https://github.com/kripod/react-hooks/issues"},"homepage":"https://github.com/kripod/react-hooks#readme","_id":"state-hooks@3.0.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.20.2/node@v12.16.1+x64 (linux)","dist":{"integrity":"sha512-jPGBy2o+hJ7F6DY7IiFlWkRMqUOrGiEC6anb7adIYaLjC/d4FfuhPd8w/IIsziVJtNzqNgS35vcaAJcYO8bFVQ==","shasum":"9ff5802062bc8b51b56537f477862237698eee02","tarball":"https://registry.npmjs.org/state-hooks/-/state-hooks-3.0.0.tgz","fileCount":22,"unpackedSize":59127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegnPHCRA9TVsSAnZWagAAVZ8P/2BIKENCZ8gxeq+rOoRU\nV3/shEEeUif9Fs5GzXgbjm8AazfPeDEq998ApUvwBWOO60EExrNBeRXCszoQ\njaIySMHGrt4kB0/CSc0sB2hyimf0Ok96qUQYUIMI9TfkqHzbwjy24Ttyvr8x\n6kLNME/e0OFTGVxBY+fHGkSckvT+xvRswkqQ/5B5OxMKyexbkMmuQlIWV1WM\nimpQ/Vn3443D4ThqtbKUx/sDpC0dcMuqgZ5yuSZtSs11z1+sUXfECW7fVZyi\nNshZ+HPcwN08up7SWxicAfyV8JPcDA53MoPp7Y0PoY2Df7wUyGrvdBTaeXt1\nTkXttnik5GeD4JVa+yEs5UKtEUvKRu5p4aK5MM4TeYy3AsooZc6RjHbe3LoZ\nJjDjqrrPx4TyTrZQtgXQcBHp6Ewj1pfkAYyUNBpQNE0dHCAWRdW60uGWu2gm\nSOipD2slvAuGDzKJkBZUFK7qvNF94CD3OCsFOegtcQ2USXzDTHImusorlOC/\nJzyWBK6+/30PQvr5SUNdZ2PB9ngCpjIbSLvl4jYvBSw+Lym/suwOyA0qY2Ih\n0kUbrwrZRaIbQT1uDk8W6VIShnYUsrum/WuMy8OMa0gLuR2ihwMW5OP2+SzU\nQFgkiE89iOFciKwG9ESEHKxfWGjotdlswkB2HtsRTsZyiZ8g06LIPV4BtCnV\niev0\r\n=GzLC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm8QOYzrCyF2lHG/3dmaui+Z29bV3Mf+0EnewuOMZf2wIhAOd3JDUFdMzC/jE4U4giANcF0OJHnNuNL/o4FJO5Yn4W"}]},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"_npmUser":{"name":"kripod","email":"kripod@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-hooks_3.0.0_1585607622586_0.6922172516526177"},"_hasShrinkwrap":false},"3.0.1":{"name":"state-hooks","description":"Essential set of React Hooks for convenient state management.","version":"3.0.1","license":"MIT","pika":true,"sideEffects":false,"keywords":["react","hooks","react-hooks","essential","state-management"],"repository":{"type":"git","url":"git+https://github.com/kripod/react-hooks.git","directory":"packages/state-hooks"},"dependencies":{},"peerDependencies":{"react":">=16.8"},"devDependencies":{"typescript":"^3.9.3"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","bugs":{"url":"https://github.com/kripod/react-hooks/issues"},"homepage":"https://github.com/kripod/react-hooks#readme","_id":"state-hooks@3.0.1","_nodeVersion":"12.17.0","_npmVersion":"lerna/3.22.0/node@v12.17.0+x64 (linux)","dist":{"integrity":"sha512-7PlwcKraTEmNq06DnpoPB/qSoC3BB1nM9NInpaVEAGC+CIu6/gff8+sGNB0AYkr7STZgTSZMu5CxVpx4OqA7Ig==","shasum":"3ddde828d14bb0df7ea02727703e382e76e891ce","tarball":"https://registry.npmjs.org/state-hooks/-/state-hooks-3.0.1.tgz","fileCount":22,"unpackedSize":59254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0+WSCRA9TVsSAnZWagAA2HoQAJqcf2eeLGZRdQ/OlblY\nlCv8W8zsgE3VeEt7hxSCp8rt9zpvpxgxVXKEw5tOHFDZyjOmutVwyxOaiN42\nh+wY0YqzKpqk2NhoXmbjJFa/E0JznvrwauZMSsiUu58EhAHjBYXvIf2751dE\npnycQuPsvLvmOF/JP88NRGtzxSnfKyYOyptw4hfm3xu1Z24phUDIVFpp4f6T\naCGerFeqG9UcGz5HUj1oGHNgQlqkTcCrP/C0i0redSDBGa/4++t9NNkHdECq\nbbe7N84/pwELYvS2R0lhlRulie8kXrJKyZVgtd7AW3/f+cKILmuJbGVcHGL7\nmuO9EZ6e+pXGxyPBjTECb8qN5u2P8tetFEFRQRLI9s6/daGbPzJR/0rkz8E3\nqZqTnhJwiFOH7B3VHocd7vlcb3aHnsQBjS7Hpf77+HPKi8aCY52ZWCwcrVdj\nORumdO0Y3tkvlfCt4O+hWoxff11SZCWOq7se29PlvL2nbQImoJYCp40J6dld\noYJgCYWTy1FDAnPcBk8D6Bad82DyzX9PmfY3qC57qg/2J8MMJAL8bSOKKeHB\nLuKt0OkCvzPvz2VYjN5u/e9qyS4UVkTUCXFWOm7LiKUWJEoAt+v6Tuvoj3jd\nqgeGuuDb1KgqQwgrFCm/NjgbbtVtrJR1qRlDU7F0pbUs0tSQOAfOCS312o9o\nngwJ\r\n=NeoJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBefcYsWPkjFWlq3WdTCjmwWgqJkmB6zIiw5XmUCPbOhAiB5d9s68yiefJp6IJjiVG1OdqGkDWFYzXzbFe+xRPXu7g=="}]},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"_npmUser":{"name":"kripod","email":"kripod@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-hooks_3.0.1_1590945169457_0.39229907792919905"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-09T10:23:17.771Z","0.0.0":"2019-10-09T10:23:17.887Z","modified":"2022-05-18T16:09:03.111Z","2.0.0":"2019-10-13T15:35:57.810Z","2.0.1":"2019-10-16T17:32:11.934Z","2.1.0":"2019-10-26T22:23:24.498Z","3.0.0":"2020-03-30T22:33:42.871Z","3.0.1":"2020-05-31T17:12:49.569Z"},"maintainers":[{"name":"kripod","email":"kripod@protonmail.com"}],"readme":"# state-hooks\n\nEssential set of [React Hooks] for convenient state management.\n\n[react hooks]: https://reactjs.org/docs/hooks-intro.html\n\n## Key features\n\nBeing part of the [@kripod/react-hooks] project, this package is:\n\n- 🌳 **Bundler-friendly** with tree shaking support\n- 📚 **Well-documented** and type-safe interfaces\n- ⚛️ **Zero-config** server-side rendering capability\n- 📦 **Self-contained**, free of runtime dependencies\n\n[@kripod/react-hooks]: https://github.com/kripod/react-hooks\n\n## Usage\n\nAfter installing the package, import individual hooks as shown below:\n\n```javascript\nimport { usePrevious, useUndoable } from 'state-hooks';\n```\n\n## Reference\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n- [useChanging](#usechanging)\n- [usePrevious](#useprevious)\n- [useTimeline](#usetimeline)\n- [useToggle](#usetoggle)\n- [useUndoable](#useundoable)\n\n### useChanging\n\nTracks whether a value has changed over a relatively given period of time.\n\n#### Parameters\n\n- `value` **T** Props, state or any other calculated value.\n- `groupingIntervalMs` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Time interval, in milliseconds, to group a batch of changes by. (optional, default `150`)\n\n#### Examples\n\n```javascript\nfunction Component() {\n  const scrollCoords = useWindowScrollCoords();\n  const isScrolling = useChanging(scrollCoords);\n  // ...\n}\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** `true` if the value has changed at least once over the given interval, or `false` otherwise.\n\n### usePrevious\n\nTracks previous state of a value.\n\n#### Parameters\n\n- `value` **T** Props, state or any other calculated value.\n\n#### Examples\n\n```javascript\nfunction Component() {\n  const [count, setCount] = useState(0);\n  const prevCount = usePrevious(count);\n  // ...\n  return `Now: ${count}, before: ${prevCount}`;\n}\n```\n\nReturns **(T | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** Value from the previous render of the enclosing component.\n\n### useTimeline\n\nRecords states of a value over time.\n\n#### Parameters\n\n- `value` **T** Props, state or any other calculated value.\n- `maxLength` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Maximum amount of states to store at once. Should be an integer greater than 1. (optional, default `MAX_SMALL_INTEGER`)\n\n#### Examples\n\n```javascript\nfunction Component() {\n  const [count, setCount] = useState(0);\n  const counts = useTimeline(count);\n  // ...\n  return `Now: ${count}, history: ${counts}`;\n}\n```\n\nReturns **ReadonlyArray&lt;T>** Results of state updates in chronological order.\n\n### useToggle\n\nWraps a state hook to add boolean toggle functionality.\n\n#### Parameters\n\n- `useStateResult` **\\[[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), React.Dispatch&lt;React.SetStateAction&lt;[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>>]** Return value of a state hook.\n  - `useStateResult.0` Current state.\n  - `useStateResult.1` State updater function.\n\n#### Examples\n\n```javascript\nfunction Component() {\n  const [isPressed, setPressed, togglePressed] = useToggle(\n    useState < boolean > false,\n  );\n  // ...\n  return (\n    <button type=\"button\" aria-pressed={isPressed} onClick={togglePressed}>\n      Toggle state\n    </button>\n  );\n}\n```\n\nReturns **\\[[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), React.Dispatch&lt;React.SetStateAction&lt;[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)>>, function (): void]** State hook result extended with a `toggle` function.\n\n### useUndoable\n\nWraps a state hook to add undo/redo functionality.\n\n#### Parameters\n\n- `useStateResult` **\\[T, React.Dispatch&lt;React.SetStateAction&lt;T>>]** Return value of a state hook.\n  - `useStateResult.0` Current state.\n  - `useStateResult.1` State updater function.\n- `maxDeltas` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Maximum amount of state differences to store at once. Should be a positive integer. (optional, default `MAX_SMALL_INTEGER`)\n\n#### Examples\n\n```javascript\nfunction Component() {\n  const [value, setValue, { undo, redo, past, future }] = useUndoable(\n    useState(''),\n  );\n  // ...\n  return (\n    <>\n      <button type=\"button\" onClick={undo} disabled={past.length === 0}>\n        Undo\n      </button>\n      <input value={value} onChange={(event) => setValue(event.target.value)} />\n      <button type=\"button\" onClick={redo} disabled={future.length === 0}>\n        Redo\n      </button>\n    </>\n  );\n}\n```\n\nReturns **\\[T, React.Dispatch&lt;React.SetStateAction&lt;T>>, {undo: function (): void, redo: function (): void, past: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;T>, future: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;T>, jump: function (delta: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)): void}]** State hook result extended with an object containing `undo`, `redo`, `past`, `future` and `jump`.\n","readmeFilename":"README.md","description":"Essential set of React Hooks for convenient state management.","homepage":"https://github.com/kripod/react-hooks#readme","keywords":["react","hooks","react-hooks","essential","state-management"],"repository":{"type":"git","url":"git+https://github.com/kripod/react-hooks.git","directory":"packages/state-hooks"},"bugs":{"url":"https://github.com/kripod/react-hooks/issues"},"license":"MIT"}