{"_id":"react-hooks-helper","_rev":"26-dda9721ae97d1d5638166e38158809cd","name":"react-hooks-helper","dist-tags":{"latest":"1.6.0","next":"1.5.0-alpha.1"},"versions":{"0.0.0":{"name":"react-hooks-helper","version":"0.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"MIT","_id":"react-hooks-helper@0.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-ISuFrKMWg2UI4MKyoWr4P3uAxxRit+JJbFrqng1Yutl8CB5zVM21Pcp9gbIbFD1Zk8pMj9ec8Ukl5EO6Xxnbyg==","shasum":"bc93e5e05d8304a80e5e44ba2a92ae1f1b0a4a81","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.0.0.tgz","fileCount":1,"unpackedSize":214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFRyKCRA9TVsSAnZWagAA2AAQAJU34zTVj0AW5ORbbaN5\nHo+ZiLMdb+Il3mK1MH30/RSA/jiUzWm0Rg27rufKDYcA4V18/aCaWnKVzYP/\n3/if5DWeYVtaQB5grkfn5/Xf/Y1TKVnPvrvlv+8Fsdr6jfofxZDYMA6JPzQL\nnu8VEid8fIbrYsBuqcxX6ShduLbzU6aBE5KMXDmAOk7N+TfXnHSP0E6NyfLp\n6petAx0/QmRWHRhiCzAvwcS7CfbDhduWnlJ5pKtqkeDeDMk3NMUUr17vUFy3\naJ5eZArlUO1LzkvuI8XtDpKBb4RL3jZZtJ98FcWPhvyUwY2lLoicdCop1V1J\nw2FJr7RAERnmlM+w6CDS3w9pJ6HO7tbiKmvzcMfxyksNe3niGwxDfo3mPOo3\n4d5i7YGDtRSc4NdTAY5H/ehJZcZaYaypS4w1Gg0f1WNWaKge5UxKF8rEE17/\nnLEwQSb323V3sczHEfjte3ys0wD5ksQ6tD/qQXisvyU1VQcYz2qnr6qeCL4f\njPXP/yWUAoReNReh7X57MIjHoUs6pEorVNL6hpwsvc1eoe+VfK7D6QRzOthP\n4BUoG52yZncUZ8S1w/Y+py0nFZZ4L4mbBo5tkM4Iiize5TWZQV0D/Zfyekfb\nRKttsyTWpmx0slJLVQTCpVnO0OTh1hTH3yG/PKID9kj9GK56zq/XkIgNE0RR\nUH3n\r\n=iRZq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD75lzm3PpMXOBl+gPJ6jBeFie6loa4jGgwU+KMtVuwEwIgKpXDip8vsPQme4TZrZxn8pmbKVxWXz+9E76TmF6/78c="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.0.0_1544887434241_0.8390446698529217"},"_hasShrinkwrap":false},"0.0.1":{"name":"react-hooks-helper","version":"0.0.1","description":"[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)","main":"index.js","dependencies":{},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","gitHead":"a08dcfc97c1529fa6b71b6bbbc786ead0a710e56","_id":"react-hooks-helper@0.0.1","_npmVersion":"6.5.0","_nodeVersion":"8.2.1","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-H2ZZ7XwxQ/DXHdlTLETg+rKqeOEhp64obmhmFBixR6rx5eOwrn0y4lvYuRaoXZqsskrBgyj/j+XOA2EDOvxlgg==","shasum":"d6225e28fcde035502af2b2596ff9ab9c411bc5b","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.0.1.tgz","fileCount":3,"unpackedSize":3852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHVQkCRA9TVsSAnZWagAA5r4P/AqyRd9ZhZq/2AtS3TI6\n4Iks9D1jJbmZLGH2pU6n85ECB4QSDZ0KpomiaCnftmwOq0Cbd9MLvEvOwFRz\nN9ehSUNyMyuqZJ9x9+9bYVIbu6NCqJSZWU59DT7thrqaAXb7QvVpVXIc4kQ5\npY1C2eXG5jvgfzdd818lqPqB2vQq1T64JlptlKKrYdt8CBQ/0fHMKSokSPLF\nt0e3Ph9jXlRtEZTmect9+35kLSkh+1lZPGOaMaJeAgf67IA+GbyFDyV05vcM\n36UebfM/p5ltNgzGnIHI3csshONWHzc2dE+8W4+DSRQJYIC+GHDZyA2aOeLf\nQs//ir/SB2/gdFyEmn5xu6SUGOaa4LuRB7jodfe4hzzT0rLuPHtwQWcOjVKt\nClumCMlhgDMWym7CRFt4Qc+f1J6YvBD00AF+cSbgR2ksu0df84ZIwh7HdPHe\nL00t3qahK3R9E0m9jdRjULTMDoWxGj/21V1w9TvzS0PelK2jzSA78kyj5fEF\nM2wnAkKsD3UnXSMXjfh2M8so53i10E1UiToonLkH6V9TUKl/sKKD93OtTeJ2\nvRrdLlmfqN7HY+D3CmFAA/e4g9qr/8VMrVzNrknaMTYhbaHZy/OHtfNaH9kd\nIygkM/UvIYwWTiQVQbcEfC9ebyq0Iq3gaytYeaYEpOhP/oOgeIC+aA9lLHcP\nctK+\r\n=J4dp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnWLn30EBVdw3HPpcUzCxFNmkmHUFcOGjvArd76EzOJgIgRGG4coX/RhozHuC09avOO8RUx/3TUVGl64mKBYAOqIU="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.0.1_1545425955948_0.045042211693273826"},"_hasShrinkwrap":false},"0.0.2":{"name":"react-hooks-helper","version":"0.0.2","description":"A simple React Hook lib.","main":"dist/react-hook-helper.js","umd:main":"dist/react-hook-helper.umd.js","module":"dist/react-hook-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","build":"microbundle -o dist/ --sourcemap false --compress false","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"23e8740cd6e8ff9f6bf31d9be7bccb527e2fa624","_id":"react-hooks-helper@0.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-INNS7I0bnZLzZp/I7sfOkvZqYEV/AlnwA4dNmul4hh5a1dTbrdqaIO2sHfcVB98jRv/kSeGd4OJyZMbXS3A4QQ==","shasum":"13116a7ba8a3ee4ae0e691dbf3c99902d843bffb","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.0.2.tgz","fileCount":6,"unpackedSize":55393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJrFtCRA9TVsSAnZWagAArrAP+gNeq4rPmk1IGsT2tAvM\nJePYlQKkYUmYOH9O7bn0t30N0c7O4IAy7fl7HbyFK7qAb8t788S+wogbwS9D\nIYjUo3ppjzvKWAX4NSXLH9vrT+cYsEhCvZR6rPfgd6w5902K1Zpdx+G+nd8V\nzSANiqpVB3UmiSjbbkVk8NVp9xDfWshIhB1sK+yOKGp8gfjQjufeJkBMQg5G\n06tANiKj3vna3DDv8nqbg7jNkZNp17myOxrSRml+iYWCUOWv59+WwOjSOap4\n7IxDur/nDcyYTPIfOe5FCr3MhXYgDiFENymfzBX66DihhsBBIto1lysfb5/K\nShkz3ewCnZt4Xvn2Ie1APvy/rja/s55hMhXff+l6k05oIqgpKfFwNMOMKshu\nQXdC6A7GYwvgwhwFpXYg9WL5Gsya1w4KsspXMGRnjSuhWBA2R9ogA0FT9WRR\nCaagUdU7C8IypPFbOqHdSRaBjCwSKFJLxfgqf4IwwNxE53pJwR+tmi/7h5al\nEkBMfuS/tBdJIwSpCKjxWl2ZNMvP1oQDX9NHn7pswiZ2FRce5Fy5WFace3Ut\nW4zfzXO2UkhP6cbQ6Com9ch44oaryIctkL9stTYJ6dgo0pUNaIqGTgWDuxsl\nTuDi5TsGDCfM02RpDtG6qXXYgqGpuEc3NBJ4W8bj82d1C9wZM0wd8wQ3cnag\nT+f4\r\n=DJHH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDdZJ7LE58B6Hur2gpCR+gRy/VSfh//aPO4iyB8W8rcRAiEAtJ4sIB5WpFTgiwC6LMdV9X/7YLVJxhhaFNER9w1/ZTM="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.0.2_1546039661049_0.5257063521534666"},"_hasShrinkwrap":false},"0.0.3":{"name":"react-hooks-helper","version":"0.0.3","description":"A simple React Hook lib.","main":"dist/react-hook-helper.js","umd:main":"dist/react-hook-helper.umd.js","module":"dist/react-hook-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","build":"microbundle -o dist/ --sourcemap false --compress false","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"23e8740cd6e8ff9f6bf31d9be7bccb527e2fa624","_id":"react-hooks-helper@0.0.3","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-KQLp2F9adtD2DH7drGMeB2EqPc2DM7LE8M5dW2fG9/GgQODA1xzhjm2QF46xsJI7PPLVhq36+gDB3ONyETbJsQ==","shasum":"a5a1c06e295bd7da8a850e70a47fec694f1609e4","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.0.3.tgz","fileCount":6,"unpackedSize":8654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJrWZCRA9TVsSAnZWagAATSQP/jcWjcehVQnN8nnL69tQ\nbWdJKsAcao6WBToqj15plPc7NZJ7IoiVyKlb5M77xKq3VWb6hF5uZ9JGIok5\nRPFrZi5cZLLJkd8YomJcLUdewuE+5S/Jhg31JG9tmPbocxc2U9JLOJht/HWd\nl++EYNucMCtaEtazrPgAQIbdlFKak/MWSC1M/+Twul+bhy3JEA6g1ThGYnlp\napqWem6auGmjTI/YPhv0vpysEu1g8T5ccjNiBEOacDxmUR3RVZYCNpqb0yJ1\nBzUqG/yway6fVQTJvDXLHfK7rY/GxxmCzsmgFBE4gg7f/91FiZgea0h7Q0yb\nxHzAYZYEMfo0YDdz4t4aShEIQwTkOm3wmgcsIQ0ComPd7C/+qmuFW2LC0/Dl\nPS37SP+HwrjAjxzJzpWNettrM4tYMaFgaCeFiGbt8V4PP+3Y7h3rRSiZKtvf\n6V4BBIp71tnnzQcILet14LbSM+PEr+xdsNkchdIRnQZUO1l40cHzP4Ok3Hh4\n1QFBKX/jabvSD1pX/wfttGr8MtGU+V/CUqaSNJxq/th04XZa1LbWXL63TFeY\niOr/xYPAAnFlrzp+DIl8Oi5uRc3M86pB1FUHBsm85ZuEJzesF3ofLC4JJoOP\nqVPLTB4DCDKK6LGbN5yokPsZRdnwngZzCdrKVJMTRVnW5mTjNeeHxQJKJHxf\ni673\r\n=lRe/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFn7bTSGJEDhSp759QvIzmnY39ec/c66/Ki5wjQRZ7WAAiEA5j7Y25GDccYOoiUw1l9QGC+bj1TvUfcjTRnBMOTubkI="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.0.3_1546040728618_0.511532134125755"},"_hasShrinkwrap":false},"0.0.4":{"name":"react-hooks-helper","version":"0.0.4","description":"A simple React Hook lib.","main":"dist/react-hook-helper.js","umd:main":"dist/react-hook-helper.umd.js","module":"dist/react-hook-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","build":"microbundle -o dist/ --sourcemap false --compress false","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"9e87d29156eff4de91f5b94a349c5f40321d5848","_id":"react-hooks-helper@0.0.4","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-aXP1dTi4PBQzOi3SPgNMHmQUNGGL/nPO3iM5Po7Z3GV6NT/oXW4BkJ9d/Amf+pyBa2K3SrE3OV1XXgruenU7jg==","shasum":"c69daf85af04b37c3ec5450b755598255855229e","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.0.4.tgz","fileCount":6,"unpackedSize":8647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJrhICRA9TVsSAnZWagAA+QQP/ip1IU6N/ivhzUOQpuHu\niDh1hlYAbhYbUMV0tm93JI+YN7oZVfAHJo35a9isiZQaK98PHQ6NCnTHZPNR\nnlTVI6kgHKxOOku3xpsh8FB1xPj82+H295nRolTzCT/fuw0LKTMsDAhFJzic\n2fWxSRHxtMCvy470LMuoc7R0fw0DquINnFP2SFEg48GDctKA/vRvXt0PKbsV\ne5m3U/MJPq6cBGsCywCjBi9WszqHFTs5YEb6+k0CA9Oa3Lb/eHMKu3ObB2j8\nJIxlKgQ+mX1pSbsr7koEs/XWQqVuRav7ShrqnGcBU0BVU+2J7wbKqB5G9NiE\nugJg4p2CCMyCkihmxOA5AiLW41EXcyXz2+gETlh3sFZqUNmVi7pO07Hrpqiw\nrO3Il+my3sK1GhCzT7+RwNtlmRsTNa6RmZ43ClOqnqAtKUfSTm05jRTosSvb\nwx+2kD5WhkmRPP6bt85TvvSLt3L283cn6oJuxNuutjLtPI2cY5BI0Rpr4E84\nJbPJumqEjVz4mVDdbqv45g3Dz07PO0pEwjJeTvinvohW00RYiF66zq8slk4d\nW3B88nm7luvChYdHiGllabNx9ZBdOrMKSm9wHZeO8jEv+DW5F/ddqARC+CI7\nTU93+wyI9PzveAAD5xm07k0IGyzktkT8X8P8KLigPqi+cK017TZvWeDQtZcM\ng9LD\r\n=/ofJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJil/uO/FdCJTjH7tNkB+Z3F1JfTb3A37FJ94RKSZCdgIgUnuGid+143VNUb68+obaGYC/FO+gjolEvZwz9YaSRQQ="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.0.4_1546041415736_0.387745414152451"},"_hasShrinkwrap":false},"0.1.0":{"name":"react-hooks-helper","version":"0.1.0","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"9e87d29156eff4de91f5b94a349c5f40321d5848","_id":"react-hooks-helper@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-ZTUj14vHc24pNHMjUWxZAyveUUjNK2d3jTe4GhUcl+15REiLHxX6ha338BbgFnI/67cxqx0mWlyOwbvHaXWkOw==","shasum":"59ee5e34d3b619b2718c05bb0843eebd972d65da","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.1.0.tgz","fileCount":6,"unpackedSize":8673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJ33kCRA9TVsSAnZWagAAzc8P/2QcOMHfD1g2QuBbu38W\nMNPZDG84BllYwID+fh45rhkJAMMS9htM68VQUUNL5G5D23BqjelY/ctrtDHc\nMEnVseBqbq+h7xZYKPVyzHjYhAu6sXTGPrz+ceb/q2IEIJEN0jiqWoi2lwAz\nzUbhpRrE8nPQ8rAu9zZaDmiK8gbJZEQ0Xiz776Wg/lnTfoQlZhXPpRZTZM4F\n2O8byD9etlSbpBOC1v/z+LSI4NTKY7eLmBbwC+oVjLQ5auGItm7OosURjGZ7\nAmKQoyKVadDBj4t9hoiLG+4t73HDSmjTezyxAWl1ENbz0PV4sl2GRZZtLm5J\nsw35HnXa8ZsYNlNPuJzQO6qDK8I3fi9+obnUqSzLsdpenE4zUq95C2wkOtGd\nqIZ5JsQdfd1watDbkQ2en5nsi/OH/8ftP2aK9rLJwDxkU8Iv6bjf3Dw+aumJ\nIzLGo3+OXXJcfw8zH+pDxfaIMT+5eJ4wHdlWIeJ9V4OYo5/lXDwtyX8eE2AV\n13QUwa6p9DFj9fzIW47r/96AV00A651wyZSKOmMJV/7a8huIH98K3stCzHdL\nO/5XAA9TfrfUpkwjdWWPf9GSA3shoDRgVEwkhJ2xzPQJFHnOoWRXG1BOeQ3i\nIc+kuHiFr+btchuMpnhUvQ9KB2pUaD5P0hclnbryGGavUBGFYsEENdgPmpCP\nAG3r\r\n=OlXL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoenXlTOp9smWmfdunnGq/NAzVOZ3550DH1lXbVq3lZAiEA/xZ3kxVXvUAed1vknhrV6D7PKLxbYcxrU8jK7QgVk5o="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.1.0_1546092004313_0.05641228072209059"},"_hasShrinkwrap":false},"0.1.1":{"name":"react-hooks-helper","version":"0.1.1","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"db0b1d33fbdac6140bad941099c95217f07d4045","_id":"react-hooks-helper@0.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-z0+mpzuJZojHgbfcsTLRhuFXZ6L+Kf0yhpTDe/+6R/+g1PO8CrFcF3qGK9BGOAyxLEOuslKGMfeXrRQ7ZcaAyQ==","shasum":"04127b02607b5f98ee09d103a6297dc7159d661e","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-0.1.1.tgz","fileCount":6,"unpackedSize":8741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJ5e8CRA9TVsSAnZWagAA/6UP/RMCIcWwp9IljNGp8632\nb6Dqb2I2HJYCBoniKnbJVlJZQ7/8uRbhKGS7G4U4T1xtVfEGm31fsSenezoO\nbICcm7grepZ9QTkT6aQB3VNsQmZEBhyHA9KksyxKQIKqHeAdS+L7IgBVpXQo\n7zEvm3eTU1pbzZ7qut3CWCMX4u8CKslvip5AlaQozPzhhRrEehLtlNuxlsiB\nRgASv5YinKkFRN/LnHVAqU5LRrftNaxrvlYq+O7/+hVdZixcZdIp5tqUoZPK\nNiAYUl5Omi4YvcqrvEkHuJhRoKYIjKyG62dALAy6QjpjN7NWAlylYAL0Yel3\nZRzDJKcjQImGSj/Z6zWaUWoihJfm5nrMwu69JpEuByRwiuLsIYY7XhG+NBdf\nEJ2N1Bggu8wcRZ8B4dGkXQ/tOrVCAG1vohd3k5CRUiUuRS8+hr3QF6ozMoaK\nDPDxXlr9R+Vm/9Yr6NdTN/jEH/qO53OQI+hPB96ioG+SxpBzapvCSUc2Z7yg\ny1U6U0X8y861VKNkj/R/eKyfCsEmFpEee7RV7AoQQ9puUwoExb1gcFfl1mSZ\ncKLgyRlVNi5jX+Fpsa1SyJNKjsRYdma0317As19cjvGOxrhvHJqlZcdF7asJ\nnGnEaXj1BrgTkJja5P5veiauYBzEuMQ2KOLWcouYt/UTFKQVUQ0+3H5Zm/mp\no+x8\r\n=pDow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtInRThygvRIQ3yBd19J+ROk47ZqpGTy/AVULJm+OwAAiAl4mWYAiXZvW/u8U+UWIVl2hnpfgvb1hQAbrlGMKxVNw=="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_0.1.1_1546098620067_0.8878395062736644"},"_hasShrinkwrap":false},"1.0.0":{"name":"react-hooks-helper","version":"1.0.0","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"db0b1d33fbdac6140bad941099c95217f07d4045","_id":"react-hooks-helper@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-yQyzKjOmqSUImGgKJ3l8fQO/4lizEunprCyNVjnqyOzitHZTErksmPfrwon152LUYD3PZnRBWga50XRc7vryVQ==","shasum":"340a62c1563e704d4aaa040b119c292087e90a12","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.0.0.tgz","fileCount":6,"unpackedSize":8741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJ5hqCRA9TVsSAnZWagAAaigP/RxU5/XLWp4NcW8BF9Zy\nRJwyxnq8Dg6vZCq5xMzYXK5CxmiobmOaaTnefvcw6FBBIPQzuQJXRjkpIKwC\nuW80EX6WkQvyI7Kc0ON8kRvvCci81ftnU5OnsAbrjLBTczOMOxHnWGS8gxdK\nzehhBIoei/c7oL//5j4Rj5khka1ip5yqV7VA1R5FZBd7WpGQWP0nPT5dl9Z5\nHFlUxCySRcK/aHruEpre4/rCIKMb8+RMcuuTLzWuUeDKDzKMoxBFLJlfNWhV\nHCK6JfSDDCli3XcRhYjVHyy5JNFS6DsIN3rubJo2T7hA/1Hb5RMgcrwrO+NA\n3g0MzE/2znV1A53w3bNCv8aaf+cq6zVSDqHIr8KBbtSCYJ8LlS4C8ghDY+NB\nWKMl6etYPTIQ7vMQyl0h+SdqjnsTlWzZAFBRQcubwi75vYz9YYEWBi4o40mO\nDKFA3CQ4GV/v2nCdmWT+I7G+BWqK2StTsILYJW8a4SL9SHggI0rlgFLx46i0\nzl0Xavh+XDIBgTbWSxOkds7SYODXHKrG+0bWXYL9lWZgEz3wT1LCv7pfWm6r\n107JRh2C5To0jTRBk4PPJBcQarqMOF+P4ALJHq3aPi/KEaTt8araCCKWtkbl\ninxzPnEiDs5aktv0bYeW9OhNIWgImm8qED6MvAXREiVX1K1CaG7zk2ykG1hF\nxXKb\r\n=DeBH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7E4/UCcp2103JWyRMw+mNNRxsly8c2OfzKe4oD5YE9AiEArgIqMD8YkWFrREbghoFtp3K+jE76ttYuiuRnbTW9xCs="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.0.0_1546098794109_0.589571545180126"},"_hasShrinkwrap":false},"1.0.1":{"name":"react-hooks-helper","version":"1.0.1","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"dd010925a35b2572d4b1df4ad2cc2252c520227f","_id":"react-hooks-helper@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-PqnjzX6FyERPSdO1xUMhLcTkeLjeoE7zBOMLJIMWOKRDgeWw3yO57fOkRzRO3yDE1/dXZsxnZ9IO1vk8RSxjcw==","shasum":"9673e0724e770069b38839e546c5545d79e0d24a","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.0.1.tgz","fileCount":6,"unpackedSize":8748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJ8tVCRA9TVsSAnZWagAA+jIQAJ/4WbZkBh9lY0nelkHA\n0E5NtCkTCZVvyTuLJjAcJ+RMJJsOkqPhCsQaHz5THS5UJWvkgaT2wrABruW+\n+BvBuq7zfWZnpYS2y4Vcdjqr4ybFvvdca0+a7A8uq1Q7QRtAZzYNoGK0CRKF\nHb1Z/falnyo9U12D8wRFGWHSgEiWGhdvOE4DhvkMrg3qLuxtbN0ocWM/7zVg\n3jCVfMBiNGT62YaJYZw0BwrT69mtq4SwpgSU/M3giVwalSE+RbxND+IGiVer\nUG/I7sLfuWNNwwQuVTt4F4glfUsndQz1jmniKLGFYC+Xe+2+enVSZpVyA1Ts\nM/VhP/mHWbw/VkpVx/wGt7kEbrS4J5BTyVf4wh/OwveIDCUsmIa3Q1hCwfzl\nqS5RtNlqrqfwO65kwPMXPvVaEEIRbSs5yV4IlkgdavQDQTGLNLJy/v0PzHb/\ntKD5ibID+3GPvnxGdJLkP3AjalHJCMb4FRQf+9D6DyY8S/auWMIfUnEFPyAS\n2asW9R2ZMfnLaa2CUISxn5N3i1vlL4KlIuomm3X/LnM0+xEiqjwhR33M1T/0\nEE35FURoOv1nsE1C+YuuF0lodmasjvP0KlInHeTMagRf+oyi+TEer/DXKUOd\nbes8qZk0PPNvVYf3TPjEVczbaP0GhZttu6qJxRXeo3uOyXJJRzgfeIaWvRdM\nmKbt\r\n=EWl2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHloQGx7gNSFRjaiJJgJonHAd/I7/QhoL5OxzjbgNFjbAiEAjHB42RG/C55flesKcjaJ2UM4KqjgMyXslkJIBsuE9aA="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.0.1_1546111828957_0.7246513343207479"},"_hasShrinkwrap":false},"1.1.0":{"name":"react-hooks-helper","version":"1.1.0","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"e067f3285136d5280d52009305d62c02b3180831","_id":"react-hooks-helper@1.1.0","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-27FbUuAKNjLDYdu1oWO009V3ZiBRtWjRWHPQrXNgKk9077BHDFuix8O7SIK3GQLX45t8p2vFY+4Fj6xHDFcGWQ==","shasum":"cc9f2934fcc6740c3f859b7afa6cf5c5bfca7444","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.1.0.tgz","fileCount":6,"unpackedSize":10708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKARKCRA9TVsSAnZWagAA+aEP/3icTbPv3lz8j8VNNNaL\n3eU6FTeoE2U7WmobdS2A1XkcODMhFj3zl7FvcGdDUOOlTyY5WCbar1JEydl1\nHoeS9+mEy5XADP0LsM6bWlOtFTUcjKH9MCdFNDe1V1PCq+PJ7fg/zNSnTpni\nUJm5X0FXSmanaueP+F3qopbHTtRw5f4Cn3Q2GfmWVKMcFf114taQuU8TuBjK\ndiWQyMMyvpdlSqtO1QHBsj7w9r1XbcuHzpagSJL21+hDpG5o+phO7j+nxJJS\nKoVNkpitIA9axmJHPoUjVwnJQExIHnnTx25CU7PHQM5z6sHI9xTdIugrUO3f\ntvmpOimZEhMeB/kQmAuyiyYe/5kEby94U7dFQ4IQ3vUJ1q465huipnWTMnsa\nH8fep9532gQf0pXPjlv77vcQgg3YHCa5yxQ1Vz7NWPdwCcUmW0f9T/OivuBX\npgDHMvuPYJkj9DIhhMN7GOE4CnIhjKALNF/LwBowL7hUINDWT34kLNJ658vd\nYsra6ZgnCljfpIIKmHcFV2dlbxYAuw0rXA2x6cbVNvPmInOcNezYZqMiAu6Y\nT3oxi+RQTBXeSJV+AEpOF2FkTHkbK3IQQTd44ZLawwnqQKM6b0BHJFWvNoM8\nNQRGCb5mTSiZZL8ycDuJ0e5eun0hEUvuO4Uro633JN3SqaVmjAdUFMg/sLTd\nT/Yu\r\n=3Bn+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWdIBuDj5ndFGis1nyupaFuVYOtkNk2+2juVgiX1hbiwIhANyyk+IzB3+57JnS8dC0h84kXvjGUrn7RNUHuQ3WbkMH"}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.1.0_1546126409756_0.40168620559951207"},"_hasShrinkwrap":false},"1.1.1":{"name":"react-hooks-helper","version":"1.1.1","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"9b585f1778cabd8628714068713982a754a99dfe","_id":"react-hooks-helper@1.1.1","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-I2HvYoJJ8vT3QhZz0Z8eaDVrtlXkp6C/XsmL8szrdjLZW4VC48eFUbUJ7TxsY1aVUMtJ0J4RYcUI837jVwoMWA==","shasum":"e581b739f5e011a5ed4bfef2792f4254057248b5","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.1.1.tgz","fileCount":7,"unpackedSize":10912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKQAPCRA9TVsSAnZWagAAxtEP/jjB7D5gSTb0pf/Vq4ED\nn4PRKfT8/zrf8nKetBFpZgXe4T9qU1fkZLRJaj9Uyyy1ORUlKADyzorSzAYu\nMelQ9Ez2TNOb3mbl3oNaeJWk/EJlCbaUc9C4RqdzI1/dDki22f4KxhhJmnrj\neq5a0BsPXO9ZK2hEr1r4IlO4QD4uOIXpjkcU9dgSVh+IgCZXmniKz7zHFYm/\n8t9/3C0aZng7CDKPKLsFkgQAyXB+bq7Z2Usv3chwT8gjUZuCZXcPWP99xerS\nOENMpqz68LuUfRsIMVeiE1aHm9XeN4ItXH1mt0IQyaQAfUaID2M9AViY0hKy\nhAEN5ThwUrDHVQwltSHhMpJAP7og2f6sQf6J2RuZwqpOd1H3wT1GEFceFn25\nMCf7AaYH0PuzfkzKbiDS8Z7CN+bbQTt8uYezwUO7i3iTqY4Zbney7/PpRlBX\nIyYyiz3hBUh9BAlLWpIY80kv17/RJDfiqQ8uuNbgq+VsGfh68x1q8hI/oMYa\n3zlxeB/mH/6aeH/WG6shObDE6fz0AZhrJaqse3az5e6mywcW3mTp6HtxaiMp\nb7+ZSUli4Q844Th9bmZmhqR68iv1HuRi+jPA1xBnETi6J6psDv0zNPzPOW+u\npGSHxLFVc1nhv6UDhdjmWcET4OSi1raXlpnkmK4D06dDnEAVcsDerA6zdNR6\nJSSq\r\n=JQyP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+3dABmh74AZLeseUWwpiSdrIKglf8XI5Jg/3GIEuUiQIhAJNN/LnjyYzz6LU/OYKdl1B5LIbnUTtb4f1V6EpJOGMk"}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.1.1_1546190862331_0.3258927100525515"},"_hasShrinkwrap":false},"1.1.2":{"name":"react-hooks-helper","version":"1.1.2","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"^16.7.0-alpha.2","react-dom":"^16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.7.0-alpha.0"},"gitHead":"9b585f1778cabd8628714068713982a754a99dfe","_id":"react-hooks-helper@1.1.2","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-z+nZP5nYnhyplp5QAhWZ4BPRHRkX03nN2VEmzeDI1ywjybUfoz2mFAVaavV0rnbsF2qGDBQZ44rpYxD/R5+e5Q==","shasum":"5ba12170a3c884f953fd7966cd46f813f01fee95","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.1.2.tgz","fileCount":6,"unpackedSize":10765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKQGKCRA9TVsSAnZWagAAxeQP/3JXN44qU5vW/dnKakZS\ndp4BWer4dsFhRa3TTCHNHgAXPHCGLB9R8erN/YxxTYxhhpxIFhcvn065+Iij\nhaAOU6FNE9LKOD9N8CnEkBuS7dmxG8zg0NN5f3jgZ7VBcrmX3tO7qc7rf5Sm\nUpXxdIf1XuCWcoD3O34Bp3/6P/gW203pVIgIvF9Yi2AXbG8dIa+B3aJrMLAx\n+DJKp2f4CQCxlYP8pkk+PogKbipydOXYTivpY9mt8e+K+XewrbXVDsrNcjSM\n7WW1p1KHBm0Z0qehg1M3vBQg0lY+eXU44atLhKwsSsgtZE83/JWWf9iScu06\npMtE1ztd+f92zIvWqFVW/Zqy7hrqgHWXASwTl9bYlrqQ1LK1P78kQZPR0JEr\n10MqlPCk5hpggPIgDPbylyM6gOda09kY2PJ24yjS7MAbNUu5skGYkZikHfKg\nNPDFrvLHRDtK/rjtLnZMnu+r5Q8UXpJoDwOhjzNrf9Xfax6HaFO3rkrt50fr\nNvPWuobTot48vhEz4gOyFOT7YPGvt5TH7r0GmbFKi5Ab7VABqyBPb1q2PE/k\niiU27v9Fj2pclBFWzYnZ7l0QCzJiE486c7Ooqu6YD8QQZAJPfFJ/P2i3R2ou\nni4rZ6FQjytBmLZqi3PQH9nVqC9DVuq4aBz2x/WAhkEoFAYLxJy3RlPFj6Th\ntM89\r\n=UU04\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1BlfQ4XSZ9AFyfOT8tZ2tz/0FldKGjaybiBPxL9BeiQIgFAHDZkS7HWhzXEQltD9XaLVA+uPsjvxByhPS1rzqyAM="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.1.2_1546191241521_0.5089997508872295"},"_hasShrinkwrap":false},"1.1.4":{"name":"react-hooks-helper","version":"1.1.4","description":"A simple React Hook lib.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","build":"npm run lint && rimraf dist && microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"eslint":"^5.10.0","eslint-config-amex":"^9.0.0","microbundle":"^0.8.3","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"gitHead":"e507deed543140e54336f366b46808e93f37bbd6","_id":"react-hooks-helper@1.1.4","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-Ylo9hLzWFo5OS+bjoNdMq+alr9XWOG/8SAw2gnO1sj+TClMf496NrDtC+h/If4K5ux90Hl8nTvotv46pcK9Ohg==","shasum":"7398bc01254463673c762082254765904673c58b","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.1.4.tgz","fileCount":6,"unpackedSize":10766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcK8mxCRA9TVsSAnZWagAAg1AP/AseTL5fCTXpeit1ydU3\ngQf9uCqgJSlggLP+4f1uOz/1JcnsSMWFx+BgCbC/Jsii5BYYNX+lU+pYyrFA\na8Z6HBmbojQqYeOlduEU+jnapgp6wOs/y+7yegbUCKygM5MWXx65nLrt33oG\n6eku1+SJcB3xMgvNd0wSOCSd0ZL/A64hkU4IXlQ68HdjMULEokjeK8f5zfvl\n5A/xbNLpnMqoFV3Go3vNnMGaLT9Kk3Pk+2Wj8fWqLFVlLTcNdQcV1kJWt+dB\nyh/yjAHyyCkaoK7HT5TyQXsdtRhngjWFtY63eJmprgpfi30zZrermvP2rHl5\nVwT5SQwwNuiR1dT7Xo1i7Q7KzPQ/Eua2lPTCA4m9mEGr03RUTwCqtQwP+i7y\ndA5C00Yv+KnkN/Cdz+2JPUTzN8mn0d8aPOp3cMeNKh7JCh4CmHR1LX8tOydk\nnKz0zvLDnDMplRubNHCWXo5K/q7XOZPZfikz7e+0N8nDXcaQVrasumBh80Jg\n+QCoUdINFf1bGJ9RUaYNCYgTvLs80C/hWUDHK003fU22nfPe1oVWtq9BpdPr\n/WbtG8uIg4767KeoyK2fTb5KP6xmmUni8uJY5BS5+4TxTIb7ErptrXx31b2t\nIuXbS7HvNEppejzzNRvt5tuJExlRBsjEruqksTlgHVhVukSNOWBRbiochNvA\nXoLd\r\n=0vAI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDFCLyi01tVlF1Q9bEiloai8T2PVWWZEBOgiP1eSAG3oAiEAmr4bWZ6D+03VWbwa/0htVXwT1lLn+5eg/4AF533dl4g="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.1.4_1546373552952_0.828756862930133"},"_hasShrinkwrap":false},"1.2.0":{"name":"react-hooks-helper","version":"1.2.0","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.8.3","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"gitHead":"f7d7381ca87b2f0f63d515c398ab98c370935fef","_id":"react-hooks-helper@1.2.0","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-k0qJuSZD99VHPXBkvxtpvCil3iTRFA7tTeURZ88TOPDYWUBiBedw5Y75RuoraCuFRLZn1QdOQHEYYCIy7U0sVg==","shasum":"85359c6bb402f636f04cca8aa9ea628ddd8b5f85","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.2.0.tgz","fileCount":9,"unpackedSize":14106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcK9uYCRA9TVsSAnZWagAA37sP/iyc2KxxWZ5Xy7cZcPcs\nR6slM8lImyKKOCe7tH0Xj9Y3iqZkwg+WR0SRTlpmlIQBNKWFbumaHnkHRUP8\nK5hp7RTBVCx/Q/h2xGvb38gtcLY1I+hfPq5vCojt2cbajWjogBrz8Iqebn7/\nBLzMwcBUc5BtB3uB2i4SdZm6ZeHW/Y+I1jg8HLPPrOBW3vtNuzbIVaaefp0+\nQKpaCwXusAoZZa3HPSGN0Mfynopp+e1n6HF9CH57oQR/6mumWB+VrrqTXFY6\nyG52VSLQo3GrHqNxrHm9tnTfEdd2xq6fY1G5zPKffNeixkOToNYpf66KxB/D\nd8BWXTrVuUPJelXEtpG44FkFZUsMFyawdf3lCcGwUB6rTaNwXJ4e5DORMeQJ\nBM+SoVu/BVn4ZKyWEOMH+4HEH9boNU/lxoMjzHDa4u94FAfFQebRlNIMAijS\nKzD4M9A10qYjzu3d4kv29tASNk3PKRRO1dLXXsx5/3LxZa2k7e78t2ZuXQBh\nzPsTefYXlgMTgg1HKrlpsUt3WaJwEro6gtxxuTkIawHDuU0DrxRmZNoIs2BL\nOtGmaFUXPIIyQGnJzf0KncPrui7F6GSZghUn2vKtoT2dYsIfNf+B2AJrnbUW\n5kawrR5Ra1/ErTvHxkQn/RLcnk1A7cEM0fVlmwCI/B060tDLjYzG+77kjqNf\njb1w\r\n=vMht\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB22+ZNb3yk9+ZZrrNSLiYkyIlwttvqRUat51C17qGKjAiAOVqqTl+GYieRQFGeWZG0MOjeBMqJYzv86bMrTJIegxQ=="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.2.0_1546378135447_0.6060164996647779"},"_hasShrinkwrap":false},"1.2.1":{"name":"react-hooks-helper","version":"1.2.1","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.8.3","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"gitHead":"f7d7381ca87b2f0f63d515c398ab98c370935fef","_id":"react-hooks-helper@1.2.1","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-ojv+AKAj22sUv7OONEWMfQyYWcTIehZkoyLyOzl2fzKzGcJYDdk1dRvTv57bKofDCdrPZLrR7NOCiwJzvoRhRg==","shasum":"a86acfbec6d11226947f185490182829ebe061db","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.2.1.tgz","fileCount":6,"unpackedSize":11114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcK9xACRA9TVsSAnZWagAAVTsP/3alR28Kd3I5VyEi1pSx\ntjqcOV1C9po8wmrpoDobzu7DygQhX36F6eYUD6ogIMK/pXVSXhewvc3kB78A\nEj/LYGMOex5BOXa/IVkjCQjvs1xcFN5+N3hBSTr2Raqd8dn7xtUgZ+hm0oqu\n/uGWduGX9jCJsSfmYDEmITURHY/uCguHyWJkKO+/9lg5R5z4jn8P2U5jQdDA\ndM5jAQICVBueWdGPznAlVue5skgLmaS/PhoiX507i8MLSY96s0T+3ARq8Wf6\nUmVeFIscbIvoKiSm7YZu/HBRDhi2s2HPcGazGjB04GskiYA7IvWKFC9NF5/M\nL7DgKEMC/FV5gD7qj05TolGOBhZpVWKzhSeeu68keYCHB4COvfcfB4wDwy7J\n0zCwAnTl/qGEHcJsp3h5mKfkvWFqgKfZlWxDqNtT0XdtsbomvPTbA9pURomK\nORfwpgbn9qT0uik/rtf1MfjJD06HujF9E6wfMfZDAjnE6PD4TmrLgs3PbpPl\n9cqb8zoKBc4PE7BS6QcnexaR0xeZimj84ehWq92CyynYsovQ+Jd8j+vZDS8G\nzo973HHd8DsIElpZtg8EQgblbGjZISMvscxNvMY5luQfYRDiHUl6iK9tUMbe\nN996l9fSJZGtTkEe6qD7QRpz15XaUevNRgQ7ehsopqstiBX0urZfPn/GTSnl\nB6/f\r\n=UTGt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGvcCunnWDHCtPRg/Va2Ik02e0IHuH8FvOtL67f+6YVwIhANRoRAySrH8Z/V2uwZ2aamWiIanFhMizF1w8y3SNGyGh"}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.2.1_1546378304159_0.4227884182371766"},"_hasShrinkwrap":false},"1.3.0-alpha.0":{"name":"react-hooks-helper","version":"1.3.0-alpha.0","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html)  library that gives you custom hooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n## Requirement ⚠️\n\nTo use `react-hook-lib`, you must use at minimum `react@16.7.0-alpha.0`. React Hooks is currently at **[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n##\nUsage\n \n```js\nconst [bar, notBar] = useNot(bool);\nconst [{foo, bar}, setForm] = useForm({foo, bar});\nconst currentValue = useTrafficLight(initialIndex, durations);\n```\n\n## Examples\n\n### useNot\n`useNot` is a toggle function for react apps.\n___\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n \n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n}\n```\n\n\n`value`, a boolean, is a variable.\n`notValue`function that nots the value from `true` to `false` and vise versa.\nNotice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n### useForm\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because you only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n___\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we need a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState(\"\");\n  const [lastName, setLastName] = useState(\"\");\n  const [gender, setGender] = useState(\"Male\");\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} onChange={ ev => {\n        setFirstName(ev.target.value)\n      }} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} onChange={ ev => {\n        setLastName(ev.target.value)\n      }} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={ ev => {\n            setAcceptToC(ev.target.checked)\n          }} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n#### After\n```jsx\nfunction App() {\n  const [{firstName, lastName, gender, isAccept}, setValue] = useForm({firstName: \"\", lastName: \"\", gender: \"Male\", isAccept: false});\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName}  name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={setValue} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={setValue} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={setValue} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n\n```\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create one `useForm`.\nYou can have as many items in the object, and this \nallows many inputs, but with still **_one_** `useForm`.\nAnd it eliminates the use of a lambda function.\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n___\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n## `useStep`; Alpha code addtion\n\nThe new alpha `useStep` is the new `useTrafficLight`, and is a more general step wizard.\n\n> What it returns:\nstep\nduration\nisPaused\nnext\nprevious\ngo\nplay\npause\n\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the `useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and _certainly_ not `react-hooks-helper` because it was not out yet! Here's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n\n## License\n\n**[MIT](LICENSE)** Licensed\n","readmeFilename":"README.md","gitHead":"82f8089b5c663f77a61878f3a7cc1513f22470b2","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.3.0-alpha.0","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-Lw1SMVgAlxzwiGfx0qDo7CwcMyFuG8MOAxPkXPV+o60BL6XUEopUWpUE8M9cQb4QKIF8jozIReesLSFq8tl80g==","shasum":"6651c25f91098de0aac3f969948fc126ebe92ef4","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.3.0-alpha.0.tgz","fileCount":6,"unpackedSize":13285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLU5GCRA9TVsSAnZWagAA7DEP/1OduB1MQIDAZgXxmEaw\n6TZfs1rrBwldR0ma/K9HfxGsDjKZALx6caKpM9aJqstQZdwSWp+iJ1sZgW55\nRSxTsVS2+vWPeafJT5WZqnfmX78REvvtNwrVby6IGE/1YJBWYT1XDbP0qlpd\nuynit2iZHSamlN233h3JpCqp49SSROr6+3TLNy1uaX9U8aJiMXdiYxcPH7K5\nf8tSBjaxnjK2r1wLyBd441gWutQdVaV2JB7+2sXWXRJ5ARMLNdY3iUqH6VPF\nXH6JGrr9+1kLwkAZDRJLKJf4KmiL9GZNTtP3YU+i/CKro2qrMGbvg+g6myyB\nOU6lYDN51io+M2YSXXJgwXCc76/IJ4B+vNL+diQVlaA8VhPbYOlpD5fG8GFp\nCURJ6KDceieQJTZtO/SgMLS8ulcxhlGRt2Q0P09T3QuxxOdKMWhH+Bn5Zr1z\nB/qxyMZenRICC9/O4Q9siHPsGaE76q+oipM5m7RtuockOnfYSO2fqChRZUxE\ns1+9UQyI1sVXwv8x0I2/AjRLGYyp2IYGDx21iXRu6vJ0SAMXYk9E6QvR0VnL\nMMM5ani2jOhb+aTaadrggTieECJbaCatbSRyL4xUgikyX2rcmLQrJ37shnKa\n3e4IhsW8FaqJxjH4k/+i2TJA8ahozZIaYB4M+ANmwHUUHwg9nfCvfD8OWbJx\nrBhC\r\n=QHmC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3VpsRg5bt74HiKSTlO2wROMBYJTsJRYrbTMVZOwkYWgIgI7tXUh5e8jP/Nuln/CE0p/lVdk0q+JGITg4Ktiw4nP8="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.3.0-alpha.0_1546473029505_0.2867889591632029"},"_hasShrinkwrap":false},"1.3.0-alpha.1":{"name":"react-hooks-helper","version":"1.3.0-alpha.1","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html)  library that gives you custom hooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n## Requirement ⚠️\n\nTo use `react-hook-lib`, you must use at minimum `react@16.7.0-alpha.0`. React Hooks is currently at **[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n##\nUsage\n \n```js\nconst [bar, notBar] = useNot(bool);\nconst [{foo, bar}, setForm] = useForm({foo, bar});\nconst currentValue = useTrafficLight(initialIndex, durations);\n```\n\n## Examples\n\n### useNot\n`useNot` is a toggle function for react apps.\n___\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n \n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n}\n```\n\n\n`value`, a boolean, is a variable.\n`notValue`function that nots the value from `true` to `false` and vise versa.\nNotice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n### useForm\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because you only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n___\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we need a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState(\"\");\n  const [lastName, setLastName] = useState(\"\");\n  const [gender, setGender] = useState(\"Male\");\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} onChange={ ev => {\n        setFirstName(ev.target.value)\n      }} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} onChange={ ev => {\n        setLastName(ev.target.value)\n      }} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={ ev => {\n            setAcceptToC(ev.target.checked)\n          }} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n#### After\n```jsx\nfunction App() {\n  const [{firstName, lastName, gender, isAccept}, setValue] = useForm({firstName: \"\", lastName: \"\", gender: \"Male\", isAccept: false});\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName}  name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={setValue} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={setValue} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={setValue} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n\n```\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create one `useForm`.\nYou can have as many items in the object, and this \nallows many inputs, but with still **_one_** `useForm`.\nAnd it eliminates the use of a lambda function.\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n___\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n## `useStep`; Alpha code addtion\n\nThe new alpha `useStep` is the new `useTrafficLight`, and is a more general step wizard.\n\n\n##### To Install:\n```sh\n$ npm i react-hooks-helper@next\n```\n\nOr edit some a photo carousel on codeSandbox\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the `useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and _certainly_ not `react-hooks-helper` because it was not out yet! Here's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n\n## License\n\n**[MIT](LICENSE)** Licensed\n","readmeFilename":"README.md","gitHead":"3bd3747a9447412c564778806ac10fa5e3088cee","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.3.0-alpha.1","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-OOCqEPm9pGFFUpkxVK5pchfUXEMXvo6zgRa78eVH5F/Zi4UonZNFeFT2vI8Pm1c6UVuOCHE9NLc5nefTfSlrNQ==","shasum":"57e94bd22587a1c2dc44a2621a811a2d4fe2f542","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.3.0-alpha.1.tgz","fileCount":6,"unpackedSize":15569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLgh6CRA9TVsSAnZWagAAVrkP/0EThp57XEwOBujTHBEJ\nqyz1KjwnGXLDeNoVMgpsFKivUfqSNvT+W1dn6tpeMzpzo9wlliKLW2cWm6L4\n20nRPZA90D5wiU31d9GZkY2eLRSgjGTSjhuKkkyjNJ2YGgD/rPpxWlWABcT1\nd/T/9WW3z/4DUeDC0EeFipTgU/XrYoqLMVNqG250E0AEy8DtradiroW4vilh\nmqZ7lWxwoUHqxCg0PS2DMY9gFefQKk0q+06EyO/3PodD+bqpEaEYmSk2d+ZR\noQl1bUrLIK9pHrkzV9S844SvlE6J5WyItjLaH68MR3ZCR60p0Cjgz5MSTJrO\nWXjOLtas+IelLuuCSO+dPp29XSEy+LsEhRBmld1vZSJ0su5zvygpl0P2AiP2\nN+lWdBc0nTqt0lZ4DU+4X0XGQaNYDfQZk+44+aAsn2jkQsGeWVJlX/nAh4q2\nfMVL+eYz2NVr/3W69eJ4sGyfgPug63xBzSeFAFxmvlBVOkv49O91arGTnJyc\nIQti2F/nIKXHdkwWB/vnQNM5VuqMkwR45NlG/Z8H2g3xKvU1npas1pp8gbNu\nsqsRyAk8klufMAKZvUP5M0i0zVPPTiHi+NRO5WFBhSePTEUcVr7Wv/eZP7pe\nSypYvRwlwQdSHc0qARFXFiAOfdaEEpPTP0Pu1T9BDJy/NvPP+bWOSySxsSwS\n3VuF\r\n=qDTs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7YRHugxcNXiXcvXukkryXR9u3HkFQ4s8qRUvvqI0QNgIhAJsTHB/gTQDIINmrfPT2DIo62VMKGwuzgklVcPV1Ucm/"}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.3.0-alpha.1_1546520697770_0.5087537563263036"},"_hasShrinkwrap":false},"1.3.0-alpha.2":{"name":"react-hooks-helper","version":"1.3.0-alpha.2","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html)  library that gives you custom hooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n## Requirement ⚠️\n\nTo use `react-hook-lib`, you must use `react@16.7.0-alpha.2`. React Hooks is currently at **[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n##\nUsage\n \n```js\nconst [bar, notBar] = useNot(bool);\nconst [{foo, bar}, setForm] = useForm({foo, bar});\nconst currentValue = useTrafficLight(initialIndex, durations);\n```\n\n## Examples\n\n### useNot\n`useNot` is a toggle function for react apps.\n___\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n \n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n}\n```\n\n\n`value`, a boolean, is a variable.\n`notValue`function that nots the value from `true` to `false` and vise versa.\nNotice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n### useForm\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because you only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n___\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we need a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState(\"\");\n  const [lastName, setLastName] = useState(\"\");\n  const [gender, setGender] = useState(\"Male\");\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} onChange={ ev => {\n        setFirstName(ev.target.value)\n      }} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} onChange={ ev => {\n        setLastName(ev.target.value)\n      }} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={ ev => {\n            setAcceptToC(ev.target.checked)\n          }} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n#### After\n```jsx\nfunction App() {\n  const [{firstName, lastName, gender, isAccept}, setValue] = useForm({firstName: \"\", lastName: \"\", gender: \"Male\", isAccept: false});\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName}  name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={setValue} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={setValue} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={setValue} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n\n```\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create one `useForm`.\nYou can have as many items in the object, and this \nallows many inputs, but with still **_one_** `useForm`.\nAnd it eliminates the use of a lambda function.\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n___\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n## `useStep` (@next alpha only)\n\nThe new `useStep` is the new `useTrafficLight`, and is a more general step wizard.\n\n#### To install the alpha:\n```sh\n$ npm i react-hooks-helper@next\n```\n\n#### Usage\n\n```js\nconst {\n  isPaused,\n  index,\n  step,\n  navigation,\n} = useStep(config);\n```\n##### Config\n\nYou pass `useStep` a configuration object containing the following (\\* = required).\n\n| Key           | Description |\n| :------------ |:------------- |\n| `steps`\\*      | Either an array containing the steps to process or an integer specifying the number of steps. |\n| `initialStep`      | The starting step—either a string id or an index. Default = 0. |\n| `autoAdvanceDuration` | If you wish the steps to auto-advance, specify the number of milliseconds. You can also include an `autoAdvanceDuration` in each `step` in your `steps` array, if you wish to have different durations for each step. |\n\n##### Return object\n\n| Key           | Description |\n| :------------ |:------------- |\n| `isPaused`    | `true` if the `autoAdvanceDuration` is paused. |\n| `index`       | A number containing the current step index. |\n| `step`        | The current `step` object from the `steps` array. |\n| `navigation`  | A `navigation` object (see below). |\n\n##### Navigation object\n\nThe `navigation` object returned from `useStep` contains control callback functions as follows.\n\n| Key           | Description |\n| :------------ |:------------- |\n| `previous`    | Call to navigate to the previous item index. Wraps from the first item to the last item. |\n| `next`    | Call to navigate to the next item index. Wraps from the last item to the first item. |\n| `go`       | Call to navigate to a specific step by `id` or by `index`. Example: `go(2)` or `go('billing-address')` |\n| `pause`        | Pause auto-advance navigation. |\n| `play`  | Play auto-advance navigation once it has been paused. |\n\n\n#### Live demo\n\nYou can view/edit the photo carousel on CodeSandbox.\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the `useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and _certainly_ not `react-hooks-helper` because it was not out yet! Here's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n\n## License\n\n**[MIT](LICENSE)** Licensed\n","readmeFilename":"README.md","gitHead":"1634129402b4fb6f802b965b6e99a223a2bbc56f","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.3.0-alpha.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"integrity":"sha512-/HjVbWm7Th62MJSjmZvT30Ap1oeoSblNJUycxspYgMblkpCaPecEt+9QY0OqyvnawPXMHhtkRzies+aFgAmzxA==","shasum":"798d63ace5419b83744fd36999b2a4a49750d8b5","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.3.0-alpha.2.tgz","fileCount":6,"unpackedSize":17481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLlmjCRA9TVsSAnZWagAA8QcP/A16DP3vBiVdxNBUh848\nRxSnM6HVmjkeT3Fsyb+rP2/xyg/WBfq9jzsdM7K8eR99FelaCeg55MdafYW2\nweOOMNst6a32gCO6uPN/9bYRULq3dibg/iBfMT/Y2NWhtgCdYdDr77oP2sSk\nglGbpTY0qypCWCpFs5Bm6ol5B1ZLwlPd9NwY2WnGrWbj9ZdTIJQGAQgatLAJ\nIr2yhuTPwpYGVWOI94G6UIw+DNYg05QK7+J+VtPaKx/tr3u4Nzw44jnl6y5I\nUvdUYXOpLW1ywYor74soaMxRh2lJufGaBafznp9Lv/Q5UrevR32lJ/d8X2sJ\nRnRdY0SJsFcVL8oRdKVjQbi6X7o9PmfR1opfDFK2dI0RHFOirqqaPAuPbkWs\na9WXhp6whZYQxt53XW3YX8HQT545RxWnY8zxh0hVZOXxwiWdkxePEw6gc33p\nqenQD0aR0H71xDSzjJrSa7SoDs3PO1ec3B5oy1qArB1mAYWJEGvHk38Ff3N8\n2DYa2Qoxsol/H/4rGSVaadpF5Tr6eqkxamHlEiqg1AD2bjdg7D+srPBINkX9\noNfepZlZurTzdjKiUFSHuXkJcH1bLP5krbqqssV2F56VdJxf9jkeR7Zz4XMJ\nVyxDZG9U6MQqfkiIX6JifhvL6QiABatVv2Az3OHplo8Z0f+5oVNHDFAAvf4Y\ngq/h\r\n=7Gl8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlNOccIQzUBMS5DB1Dc2IGzwIQVi/1uVJR64+TGL6iHAIhAMRwryBsZ4y4r+1YVGgaKstIiWihjIx71cDcIiQ2ec64"}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.3.0-alpha.2_1546541474561_0.46104495032171733"},"_hasShrinkwrap":false},"1.3.0-alpha.3":{"name":"react-hooks-helper","version":"1.3.0-alpha.3","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html)  library that gives you custom hooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n## Requirement ⚠️\n\nTo use `react-hook-lib`, you must use `react@16.7.0-alpha.2`. React Hooks is currently at **[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n## Usage\n \n```js\nconst [bar, notBar] = useNot(bool);\nconst [{foo, bar}, setForm] = useForm({foo, bar});\nconst currentValue = useTrafficLight(initialIndex, durations);\n```\n\n## Examples\n\n### useNot\n`useNot` is a toggle function for react apps.\n___\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n \n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n}\n```\n\n\n`value`, a boolean, is a variable.\n`notValue`function that nots the value from `true` to `false` and vise versa.\nNotice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n### useForm\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because you only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n___\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we need a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState(\"\");\n  const [lastName, setLastName] = useState(\"\");\n  const [gender, setGender] = useState(\"Male\");\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} onChange={ ev => {\n        setFirstName(ev.target.value)\n      }} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} onChange={ ev => {\n        setLastName(ev.target.value)\n      }} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={ ev => {\n            setGender(ev.target.value)\n          }} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={ ev => {\n            setAcceptToC(ev.target.checked)\n          }} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n#### After\n```jsx\nfunction App() {\n  const [{firstName, lastName, gender, isAccept}, setValue] = useForm({firstName: \"\", lastName: \"\", gender: \"Male\", isAccept: false});\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName}  name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender===\"Female\"} onChange={setValue} />\n          {' '} Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender===\"Male\"} onChange={setValue} />\n          {' '} Male\n        </div>\n        <div>Selected Gender: { gender }</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept===\"true\"} onChange={setValue} />\n          {' '} I accept and agree Terms & Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n\n```\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create one `useForm`.\nYou can have as many items in the object, and this \nallows many inputs, but with still **_one_** `useForm`.\nAnd it eliminates the use of a lambda function.\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n___\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n## `useStep` (@next alpha only)\n\nThe new `useStep` is the new `useTrafficLight`, and is a more general step wizard.\n\n#### To install the alpha:\n```sh\n$ npm i react-hooks-helper@next\n```\n\n#### Usage\n\n```js\nconst {\n  isPaused,\n  index,\n  step,\n  navigation,\n} = useStep(config);\n```\n##### Config\n\nYou pass `useStep` a configuration object containing the following (\\* = required).\n\n| Key           | Description |\n| :------------ |:------------- |\n| `steps`\\*      | Either an array containing the steps to process or an integer specifying the number of steps. |\n| `initialStep`      | The starting step—either a string id or an index. Default = 0. |\n| `autoAdvanceDuration` | If you wish the steps to auto-advance, specify the number of milliseconds. You can also include an `autoAdvanceDuration` in each `step` in your `steps` array, if you wish to have different durations for each step. |\n\n##### Return object\n\n| Key           | Description |\n| :------------ |:------------- |\n| `index`       | A number containing the current step index. |\n| `step`        | The current `step` object from the `steps` array. |\n| `navigation`  | A `navigation` object (see below). |\n| `isPaused`    | `true` if the `autoAdvanceDuration` is paused. |\n| `autoAdvanceDuration` | Duration of the current auto-advance. |\n\n##### Navigation object\n\nThe `navigation` object returned from `useStep` contains control callback functions as follows.\n\n| Key           | Description |\n| :------------ |:------------- |\n| `previous`    | Call to navigate to the previous item index. Wraps from the first item to the last item. |\n| `next`    | Call to navigate to the next item index. Wraps from the last item to the first item. |\n| `go`       | Call to navigate to a specific step by `id` or by `index`. Example: `go(2)` or `go('billing-address')` |\n| `pause`        | Pause auto-advance navigation. |\n| `play`  | Play auto-advance navigation once it has been paused. |\n\n\n#### Live demo\n\nYou can view/edit the photo carousel on CodeSandbox.\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the `useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and _certainly_ not `react-hooks-helper` because it was not out yet! Here's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n\n## License\n\n**[MIT](LICENSE)** Licensed\n","readmeFilename":"README.md","gitHead":"2fdfdc56ceb5950ea98d27ea5544a69a6139bd2d","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.3.0-alpha.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"integrity":"sha512-Y1TQQhHntNUCDzE84N2L5Z9l2S9gWass7BYY4471rqWtiQWuLKsdPweoZS11YqrIRNo+dI4crNj8xXcnKm880w==","shasum":"f00132e7e1e2204da0afbdcc8510bf43325a0db5","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.3.0-alpha.3.tgz","fileCount":6,"unpackedSize":17298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLpI9CRA9TVsSAnZWagAAnxwP/RfzHPf13fdk4/fzs80+\n/azYOO6gliU1nug44n5EZTU1qR2xngISjZBqUImNhOWVcppVRPoj3dzuOyWh\nvdZvHVFRlTz3YUFT4qR2gREX/85XzBVlvGcrEaWSDFx6t+fzxPsJBe6envjB\nSaVdWnJHJKjx5stAgkoueEOSd3hh3wnbSJW/08ESB7oQpsoMD4S9a9CYdh8J\nP00mKX3EviGg+OP5FIZLLXQzYLbuNStJWZCBBzuoP+iSilph5GMmLIoFQlUz\nlLH52VI+ELe3WAbfRhQ3ZCHJWqvM7FJCGmDLTX+DeGxoK6VmWkwHnRs8JVjb\nj6GVLEiz7SAh8yLq2DlHwRX/LySuS8GY2HNGNmuMsRQM9JSV8u6Yii2ir9+S\njS2yhry6MUi25MaQJPg9d9/xWo0fmFLR1uyD2gQ/z/iBD6/z/lT64Zk3M8Fo\nd+zK8hvkW54PDh72BF9MjemXBlbVn8Xt8yLU1VLFeESCCXtwY9ApsZxsYreq\nkRlHLiwgl1vpzxozkf0ISSXv2bkaFiEDr0XX/cMtvaPohMPq2znvdJlRPBDF\nOTfGJ1cgAUxQcT6T/s72g1KfGH+zPr60Ufppqb81kgxpsXDwZl6w+TRKu98k\nh8SIwNpcSFNcBlTAKju3ojHLkDPUUbg5sgpDkwyq9b8nNXzkOgTdWMUfnt5s\nznI5\r\n=QVPE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEilPe7TRpNok6qIUUi+alJ8Rs3ImMsP5mfbLdwZMpW/AiEApPNuQnbB4x9tZEhRUdShV3MTj9dVO9olFenalVHhw50="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.3.0-alpha.3_1546555964851_0.495853391631911"},"_hasShrinkwrap":false},"1.3.0-alpha.3.1":{"name":"react-hooks-helper","version":"1.3.0-alpha.3.1","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"gitHead":"0fbd01e5e6371c6abe99ec30de85d3dd77f8b49f","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.3.0-alpha.3.1","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-4WFGsXHbWD/WikDTG8NhD30K74Pz8jCxyDPG+opGcs+i82UljpgG031JnShUyA0NIiKp/0Hg90XYqV+K+Vzidw==","shasum":"d74c68a3a7c6eee9eb9c1c294fe81ced287ec710","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.3.0-alpha.3.1.tgz","fileCount":6,"unpackedSize":17355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMjYkCRA9TVsSAnZWagAArYgP/0r6+VVO/JWwVbxrigyD\nqUvUnPqeMVhEoMpKztyT34+S+FmtgIXVxXey2IkapfGG05XqNXX7DCOJFVAZ\nDyrrM/Qm1PB+JKIgHn1gbumh6brU0T5JkoGX0tXVo+GUZBzU5XSEaKAHx8CO\n+SfNe+XoNPPEO6iFgEzAl1+n+9Q7QKqEE/jLozBGM8TPbvR1m0arHDMOtfp7\n67bHNrbfSo0v07exn4UJGx2fZcoE47Iy3Oche/2HwEI8SjkTz/cxEgxa7wFz\n1LcBOoZvn8qZvLXQkg/o6nLX7uoKxYsUkVPpgi5vBaFFS6bVMu1x5zaZVWQl\np4jHQpH4Pl/oFYrlYnUMXCqUDQzof0SPZ0weOwUIZx9octEWJ2Dqs+0blwMm\njj4JXR+KUltGZtrmzc2EGALA5nVbKDhYmIUJirgriprQcW33lk2od4VPP96a\nuDvWyipLW33l9j9mWAuTR3dTFm//tqGEhDEHe3PryX1ttLU8qWW3vxzsE+gX\n/weGRDpjLXkvfR3/O9E4R7lJA/8ZVAB0PLy+p/Fpf7dXRDQwbSTzecVtsZEU\nCy8RIDA4J0ZFAe4B/4Bfmx6a2EXdVIZn7bIhmcbCyld6x0STz2yGIPCf+bGm\nHdvV/ML12ALdm/RKdXkUq6FqeOyHh3q62EVh04M1B8AlTY5q/N8GGuqDQMzG\n5mJQ\r\n=xbCO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICaFMdl8ibzUQRZQTcj0ATaHqphYDMkOQtFx2Pv08XkhAiBkiglVB4eN7eVWlehEEj/EZ8g6MHuKZ9MvIMIyKAyOOA=="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.3.0-alpha.3.1_1546794532192_0.7451936462806745"},"_hasShrinkwrap":false},"1.4.0":{"name":"react-hooks-helper","version":"1.4.0","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.8.3","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"gitHead":"19975b609a29f82f1bbd7dfe7d51fc33ce1fd5e3","_id":"react-hooks-helper@1.4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"integrity":"sha512-dXwDEfA6azGjsA4Uy3xEtZDTfNHQajA3dJsH/u2tmGGbzy9Awf6v24QGSvatbOlgaiHQhRymhcMfTxAH+IAJNw==","shasum":"41304e0bce107c49f45a346560633046dda8a7a2","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.4.0.tgz","fileCount":6,"unpackedSize":11114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMmiiCRA9TVsSAnZWagAAkjkP/jDLWA/KpG3JN3UE29fz\nH9z+bshR3gCmiwNF+l+5wWDyol42ZZ/kJC8OkATPm5Zc9/zuQjRrDRSa7fw9\njVxwJeVpJFTr5mW1Fm6R5twbTwIiSq2G3VrKSuHU4Ecc74SY0OipSZw/SkDZ\nucXA2qt3dhUsesWcs3Q+xwE6M2ffr1QalnwgbabWl54xwE/u+2FYm+vZYmS7\nBDE0A+U41vdW3LhaD1fFg6fEdLcJkjnIfzb2RJF3PooX8K0A83CHhmn14IJB\nzLHL+Lqjhl+wQZXRMhIuHOSqapaowIM2tGIX+I8Ou2LM/m1aofGgWadLvMiX\n8L1RIk2luaXqUFTnRTz2xvU7IsNaZPMtnDSMGBGo6Mu5hua0ONZ/6nlBhUNk\n0iGuRDPiIX9tdzhjEiBzVHfJ0SHDjP+HkCshwCVaDsUv5H37K3xrkRyGMOEX\nnAUlw7h1D195X6sv4upmtE5O/lzrHSspuridNK9glN9pThhGkBlLqTkMUOww\nnz25pRRlHyrlhjbotJRA1rTH5hGbsBrF1ntjXQcjmsuXZ2/oJV9yXcierVyn\nlsJ2/ylUtY1KYvAexbqciU68Kq78jo7ktyCa0zsdnNxSK3kEzjHetmpFECPW\nnVuZeqSs5IBTs+kjBmLOaOqxElqn8CucNm1ykVz8AwBuIlBxsZki3/ao+SQ1\ndQ6n\r\n=2RqY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGlCOpWBOJHMCCK9jUULA3ebwm2l8IyLmMCODPZHy5NAiEA0WPoqBDiSjdGbxCDAk2hqxygYIpY1YAFpWsqRgInU7Q="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.4.0_1546807458335_0.707449296952825"},"_hasShrinkwrap":false},"1.4.1":{"name":"react-hooks-helper","version":"1.4.1","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.8.3","react":"16.7.0-alpha.2","react-dom":"16.7.0-alpha.2","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.7.0-alpha.2"},"gitHead":"006caf2754af43f71c610e98249a650c39c79b34","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.4.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"integrity":"sha512-OLHWBEhZaYKbUGqzGpvEdZ+z8So3qHiF3+bzxzLYeATN8aBF7IZs7o7ACbG93KruD0fW8BPbvk4ON1qzekwVQA==","shasum":"00118257bafdeb4ddd94533fcc5b0c07d0deb4d0","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.4.1.tgz","fileCount":6,"unpackedSize":11219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMmv/CRA9TVsSAnZWagAAr4MQAIKwa4eNfmWp2L7toQw+\n8SONcgTsebGddCJ3il4/FUmpVlV4I5BeH5Wp9FVLQ2I/bWQGf8yjK+0xiVFi\nSD9QMFX5oVDJqXv1njrkF/ltnvuy2+k8b/3KpInDGQN83cFiVewlGZ+QMMTv\nGDomH2yiI+vkUsOE14QPFRH2kELczG+2nEGU+tD3aCftFuI2r+akgZV2pyfd\nru5A4j1UW/7GB/gRbfHX6e1uF0iSoSo9VEKwv6EhXcXbJBH8aB1riFqf+lA1\nKo5TeZZCXZSBsXGm55ZlA6w6sVVHAGkMPLs3AI2QdZKYDCqv/dLf9oacv73E\n7oM/G5U4R8SsSPf4OOihVzj4G9Hwryuj9nEFTwbylHRAnWbTEMg9oXgST4Co\nUt+OUPqJwzRC3cZWBQueLSxui0TsNUmmOiwRAS3yfjK+Pff2FU5iOB+4gDuq\nig0Htvma/lv6cE8TZEMhYZZFW+5hZBZA+MgUkgeLhivr4oURfdUOHQEH5ifM\niB2g6nZpUjVE6JzxdEv1PzCWk5uaAwkGZ5xVzuYy8xC0/MwBbCEPT5oSCtl3\nulPyidJAQOSDmh+VDLqj3XY65AjB4Yk9dPADebOUjtj8+C3eJ3ZDSVeYgv3Y\nzjeOPcffS+uyIXJCEL6/VS/+n8dqXF8FrI4fcUGqfBxaJ+rTyw5Kycq38Jzi\n1L7Z\r\n=YLIH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFR206mCvz6VfoWB6DfHaerwZ2zNdD8diDwt6vU7jCF+AiA3P4CQES/KB2/7ScOm9wYhi2myP2VyLIP/SX6+ipexJw=="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.4.1_1546808318944_0.8268086429777382"},"_hasShrinkwrap":false},"1.5.0-alpha.0":{"name":"react-hooks-helper","version":"1.5.0-alpha.0","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.8.0-alpha.0","react-dom":"16.8.0-alpha.0","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.8.0-alpha.0"},"readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html) library that gives you custom\nhooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n## Requirement ⚠️\n\nTo use `react-hook-lib`, you must use `react@16.8.0-alpha.0`. React Hooks is currently at\n**[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n## Usage\n\n```js\nconst [bar, notBar] = useNot(bool);\nconst [{ foo, bar }, setForm] = useForm({ foo, bar });\nconst currentValue = useTrafficLight(initialIndex, durations);\n```\n\n## Examples\n\n### useNot\n\n`useNot` is a toggle function for react apps.\n\n---\n\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue',\n      }}\n    />\n  );\n}\n```\n\n`value`, a boolean, is a variable. `notValue`function that nots the value from `true` to `false` and\nvise versa. Notice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n### useForm\n\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because\nyou only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n\n---\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we\nneed a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState('');\n  const [lastName, setLastName] = useState('');\n  const [gender, setGender] = useState('Male');\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input\n        type=\"text\"\n        value={firstName}\n        onChange={ev => {\n          setFirstName(ev.target.value);\n        }}\n      />\n      <div>{firstName}</div>\n      <input\n        type=\"text\"\n        value={lastName}\n        onChange={ev => {\n          setLastName(ev.target.value);\n        }}\n      />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input\n            type=\"radio\"\n            value=\"Female\"\n            checked={gender === 'Female'}\n            onChange={ev => {\n              setGender(ev.target.value);\n            }}\n          />{' '}\n          Female\n        </div>\n        <div className=\"radio\">\n          <input\n            type=\"radio\"\n            value=\"Male\"\n            checked={gender === 'Male'}\n            onChange={ev => {\n              setGender(ev.target.value);\n            }}\n          />{' '}\n          Male\n        </div>\n        <div>Selected Gender: {gender}</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input\n            type=\"checkbox\"\n            value=\"true\"\n            checked={isAccept === 'true'}\n            onChange={ev => {\n              setAcceptToC(ev.target.checked);\n            }}\n          />{' '}\n          I accept and agree Terms &amp; Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [{ firstName, lastName, gender, isAccept }, setValue] = useForm({\n    firstName: '',\n    lastName: '',\n    gender: 'Male',\n    isAccept: false,\n  });\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender === 'Female'} onChange={setValue} />{' '}\n          Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender === 'Male'} onChange={setValue} /> Male\n        </div>\n        <div>Selected Gender: {gender}</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept === 'true'} onChange={setValue} /> I\n          accept and agree Terms &amp; Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create\none `useForm`. You can have as many items in the object, and this allows many inputs, but with still\n**_one_** `useForm`. And it eliminates the use of a lambda function.\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n\n---\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n## `useStep` (@next alpha only)\n\nThe new `useStep` is the new `useTrafficLight`, and is a more general step wizard.\n\n#### To install the alpha:\n\n```sh\n$ npm i react-hooks-helper@next\n```\n\n#### Usage\n\n```js\nconst { isPaused, index, step, navigation } = useStep(config);\n```\n\n##### Config\n\nYou pass `useStep` a configuration object containing the following (\\* = required).\n\n| Key                   | Description                                                                                                                                                                                                           |\n| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `steps`\\*             | Either an array containing the steps to process or an integer specifying the number of steps.                                                                                                                         |\n| `initialStep`         | The starting step—either a string id or an index. Default = 0.                                                                                                                                                        |\n| `autoAdvanceDuration` | If you wish the steps to auto-advance, specify the number of milliseconds. You can also include an `autoAdvanceDuration` in each `step` in your `steps` array, if you wish to have different durations for each step. |\n\n##### Return object\n\n| Key                   | Description                                       |\n| :-------------------- | :------------------------------------------------ |\n| `index`               | A number containing the current step index.       |\n| `step`                | The current `step` object from the `steps` array. |\n| `navigation`          | A `navigation` object (see below).                |\n| `isPaused`            | `true` if the `autoAdvanceDuration` is paused.    |\n| `autoAdvanceDuration` | Duration of the current auto-advance.             |\n\n##### Navigation object\n\nThe `navigation` object returned from `useStep` contains control callback functions as follows.\n\n| Key        | Description                                                                                            |\n| :--------- | :----------------------------------------------------------------------------------------------------- |\n| `previous` | Call to navigate to the previous item index. Wraps from the first item to the last item.               |\n| `next`     | Call to navigate to the next item index. Wraps from the last item to the first item.                   |\n| `go`       | Call to navigate to a specific step by `id` or by `index`. Example: `go(2)` or `go('billing-address')` |\n| `pause`    | Pause auto-advance navigation.                                                                         |\n| `play`     | Play auto-advance navigation once it has been paused.                                                  |\n\n#### Live demo\n\nYou can view/edit the photo carousel on CodeSandbox.\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the\n`useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and\n_certainly_ not `react-hooks-helper` because it was not out yet! Here's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n## License\n\n**[MIT](LICENSE)** Licensed\n","readmeFilename":"README.md","gitHead":"40153561bc6482d8c3542a4ffc5fa612137ce4c0","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.5.0-alpha.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"donavon","email":"github@donavon.com"},"dist":{"integrity":"sha512-dTMOnSLqc3NUpJ9QE24Nj1Q+/4dx9Up2ZFDtw6TmuJcms6QMCGb39/Ck4nJz7soa0R3JnTG+f0VjZaIRJ8ipiA==","shasum":"f4dfd0c1168347e45a796bc4df61c4daa797142d","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.5.0-alpha.0.tgz","fileCount":6,"unpackedSize":18802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNzQhCRA9TVsSAnZWagAA+pUP/R8rZeUdHDe4e3BERr+m\nbwYEeIRUmDR4E+fLiw5JXlfY+/1yE5HAupaepeSNxBCI+bqhmiGtHINpH7Ol\nmBFaSxdT84alce0sfz6MO333vr5Vi8hbSdYXL9ZYnjDhtrVY8HPBQo4slItg\nr3wGrpNpcLyCtypA+rNWsFRnTKWuYJgL2a3eNny5fwobtBo580Xo9t4g4/VD\nlmu8xYGv+wAdPc1nTzmb892JyBgj9f3fJaG3nyAGEoFxk9+xVmtrf0GV2yah\nbDbc8oshY+T+1LK7tJCA9Haw/6IqER6XX7/KyUj6P4eLaGY3QwpDqUf/bfrO\n/Bu1AB7C8Nu29olShv7pZFmZFriybyN7u1Tam2hShTxClU4ZK8PvW0umvEIv\n0UjIgoW3/8pcv2FR/6miv+IZfwqUoG+oFN2clJR4+fjxsswUs0agYMo7NPYT\n4M32uOXgXxTDX+rb7fAY86Hoy3ZMNjqUNCeBjiBMcvyj69H32eF3sWkarCMd\n9odtP/P48wY1/bwMDrtfgyIzqMCa5YiUGES6dzTAcWU5PvqOwq3giFfq/IQh\nZp2GT+Fez/1rK3OuCQgM2IT4IjQ+oqcPZmHAAA9xxrzSX2Ant4PcbyCghkJh\nieEGr+b0WmulEpZlmmXUJklFdb963w0umQV1U9do9/5Xj8bERELkgFexFHne\njMkq\r\n=j2C7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFo6z8JzTn0JgYE+VercSU2vSDfv2u+Ofh61s7Z7l52TAiEAxhtBs/Qx5GHTJIMgkMh1T/6L6ZaWdrZJ+tO/NPxnb80="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.5.0-alpha.0_1547121696406_0.8192327150106715"},"_hasShrinkwrap":false},"1.5.0-alpha.1":{"name":"react-hooks-helper","version":"1.5.0-alpha.1","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest --verbose --coverage --silent","test:watch":"jest --watch --runInBand --silent","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.8.0-alpha.0","react-dom":"16.8.0-alpha.0","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.8.0-alpha.0"},"readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html) library that gives you custom\nhooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n## Requirement ⚠️\n\nTo use `react-hook-lib`, you must use `react@16.8.0-alpha.0`. React Hooks is currently at\n**[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n## Usage\n\n```js\nconst [bar, notBar] = useNot(bool);\nconst [{ foo, bar }, setForm] = useForm({ foo, bar });\nconst currentValue = useTrafficLight(initialIndex, durations);\n```\n\n## Examples\n\n### useNot\n\n`useNot` is a toggle function for react apps.\n\n---\n\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue',\n      }}\n    />\n  );\n}\n```\n\n`value`, a boolean, is a variable. `notValue`function that nots the value from `true` to `false` and\nvise versa. Notice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n### useForm\n\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because\nyou only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n\n---\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we\nneed a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState('');\n  const [lastName, setLastName] = useState('');\n  const [gender, setGender] = useState('Male');\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input\n        type=\"text\"\n        value={firstName}\n        onChange={ev => {\n          setFirstName(ev.target.value);\n        }}\n      />\n      <div>{firstName}</div>\n      <input\n        type=\"text\"\n        value={lastName}\n        onChange={ev => {\n          setLastName(ev.target.value);\n        }}\n      />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input\n            type=\"radio\"\n            value=\"Female\"\n            checked={gender === 'Female'}\n            onChange={ev => {\n              setGender(ev.target.value);\n            }}\n          />{' '}\n          Female\n        </div>\n        <div className=\"radio\">\n          <input\n            type=\"radio\"\n            value=\"Male\"\n            checked={gender === 'Male'}\n            onChange={ev => {\n              setGender(ev.target.value);\n            }}\n          />{' '}\n          Male\n        </div>\n        <div>Selected Gender: {gender}</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input\n            type=\"checkbox\"\n            value=\"true\"\n            checked={isAccept === 'true'}\n            onChange={ev => {\n              setAcceptToC(ev.target.checked);\n            }}\n          />{' '}\n          I accept and agree Terms &amp; Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [{ firstName, lastName, gender, isAccept }, setValue] = useForm({\n    firstName: '',\n    lastName: '',\n    gender: 'Male',\n    isAccept: false,\n  });\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender === 'Female'} onChange={setValue} />{' '}\n          Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender === 'Male'} onChange={setValue} /> Male\n        </div>\n        <div>Selected Gender: {gender}</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept === 'true'} onChange={setValue} /> I\n          accept and agree Terms &amp; Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create\none `useForm`. You can have as many items in the object, and this allows many inputs, but with still\n**_one_** `useForm`. And it eliminates the use of a lambda function.\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n\n---\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n## `useStep` (@next alpha only)\n\nThe new `useStep` is the new `useTrafficLight`, and is a more general step wizard.\n\n#### To install the alpha:\n\n```sh\n$ npm i react-hooks-helper@next\n```\n\n#### Usage\n\n```js\nconst { isPaused, index, step, navigation } = useStep(config);\n```\n\n##### Config\n\nYou pass `useStep` a configuration object containing the following (\\* = required).\n\n| Key                   | Description                                                                                                                                                                                                           |\n| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `steps`\\*             | Either an array containing the steps to process or an integer specifying the number of steps.                                                                                                                         |\n| `initialStep`         | The starting step—either a string id or an index. Default = 0.                                                                                                                                                        |\n| `autoAdvanceDuration` | If you wish the steps to auto-advance, specify the number of milliseconds. You can also include an `autoAdvanceDuration` in each `step` in your `steps` array, if you wish to have different durations for each step. |\n\n##### Return object\n\n| Key                   | Description                                       |\n| :-------------------- | :------------------------------------------------ |\n| `index`               | A number containing the current step index.       |\n| `step`                | The current `step` object from the `steps` array. |\n| `navigation`          | A `navigation` object (see below).                |\n| `isPaused`            | `true` if the `autoAdvanceDuration` is paused.    |\n| `autoAdvanceDuration` | Duration of the current auto-advance.             |\n\n##### Navigation object\n\nThe `navigation` object returned from `useStep` contains control callback functions as follows.\n\n| Key        | Description                                                                                            |\n| :--------- | :----------------------------------------------------------------------------------------------------- |\n| `previous` | Call to navigate to the previous item index. Wraps from the first item to the last item.               |\n| `next`     | Call to navigate to the next item index. Wraps from the last item to the first item.                   |\n| `go`       | Call to navigate to a specific step by `id` or by `index`. Example: `go(2)` or `go('billing-address')` |\n| `pause`    | Pause auto-advance navigation.                                                                         |\n| `play`     | Play auto-advance navigation once it has been paused.                                                  |\n\n#### Live demo\n\nYou can view/edit the photo carousel on CodeSandbox.\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the\n`useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and\n_certainly_ not `react-hooks-helper` because it was not out yet! Here's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n## License\n\n**[MIT](LICENSE)** Licensed\n","readmeFilename":"README.md","gitHead":"006caf2754af43f71c610e98249a650c39c79b34","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.5.0-alpha.1","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"revelcw","email":"revelcarlbergwest@gmail.com"},"dist":{"integrity":"sha512-wBy1+5tbtNi0d/elKPz3HQELsifJlAvE2H8Uw4SviMhJis81bVV+nCv3zU/4NAqBeYMCoU2v4LVToRK8shbPRA==","shasum":"84e16e0e4f43b30cb7d15076e878a895c841294b","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.5.0-alpha.1.tgz","fileCount":21,"unpackedSize":104528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOlmtCRA9TVsSAnZWagAAkZQP/j8eXzK/vPg5JGRyd1Db\nm3tS631oV54WGfhkM2gRHXDVQ8Zyx6eHODGL07IvPpxjKRoxaRe0Pirh/A5P\nfl0C5NvDJoiv54XcY6r7ebsVFgzwJGYd+2rde1aWrOIPGCwS4nHLgnJbFzL2\nHJTYyZwHhuq/F10HxDGhcp/1bVRTbZJJ8wibA+EG1ixltYGEFV8iyPAShaUS\nZJHFIpOcQsEIc93VEz6udAjfxSChiEib4+LOVZE5nTkiS5xYK2mef4Z8rZ6c\nl/Vj06DKcK7Ykk8PXm7wx48MAhJuLlWo05BuPWH6T/71yMSsJNaXoAGpy2DK\nowrYHnuaplr9YXYKCK9FppXOu0nkox7uzqbUtPgcaf/Cfatfo3YulwSxxIVD\n/YxF7QY2VFG5t0ruJAHxtSTbQYmwfCXl5uztd5QKNhOvHX5lsSThtbpqUXcs\nTHLjHesh2r6QXXyLpMzG5RWTpIfwtw5JBzLsK/wYsrAq1YCXiU5ZpIpWCggk\n5O+S5BUHMsSB9GJHNKYI9VsCogKRyQSDNfTKTG7wm+JAexHRhzs/YO9IvGqw\nGJK37wv+FVZXQrU/U0chqdrPgamIDNY5+WXk8kCTC7Ub3P1ooAqacLeBML5D\nVBdJXSK/5dxdfnWvj00BmZfqoW/ERmom8o9Vm6exLv5zhmMFoFWdMs7lcJ36\n0s4T\r\n=TsNg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3nyMYU4VmkNeZpz/eiJjNkJ6YsqHxZxideNzkD9jcLAiBv0gtGKyYOHGggggu/+tWrHQa33mWZ7j+viC7g75s/fg=="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.5.0-alpha.1_1547327916332_0.37541843802255404"},"_hasShrinkwrap":false},"1.5.0":{"name":"react-hooks-helper","version":"1.5.0","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest --verbose --coverage --silent","test:watch":"jest --watch --runInBand --silent","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib","form","step","wizard"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"16.8.0-alpha.0","react-dom":"16.8.0-alpha.0","react-testing-library":"^5.4.2","rimraf":"^2.6.2"},"peerDependencies":{"react":"16.8.0-alpha.0"},"gitHead":"9e633c48d14d183253d71ac40b286b184f275c1e","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.5.0","_nodeVersion":"10.15.0","_npmVersion":"6.6.0","dist":{"integrity":"sha512-cXd/oyL3Y8tADw2zGhT4wXJEkdc2TNnHRaY716nee4P+AYFZpstnPlVOeOvy5yu+2IvksdnIHqL6J48PbCZZHQ==","shasum":"86aaf751d2672bf0b3d02e8315c2a93f4d36b3ab","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.5.0.tgz","fileCount":6,"unpackedSize":18676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRKIDCRA9TVsSAnZWagAArFEP/1z7AVwmih5NdTBZgYMF\naL7ODT/n4pijKYn8Cel4X39v0/ZFh5L4WE7XyD7ckcnRY+aAsMAR4fj3HPx7\ncVdycgjjY7AADrEpAism7DXyCaHtPrBerETfjvR9ED1Y6gODutcV80gv4oIh\n10yX3rfpYJMjHpV+JkL8R6P565yq1w0thPv2SoBkz3uXNnXEjSl3S1OPA7mH\nlfsFwQSI1Q6Ne8jFgKDroPBJCFDvzGZ+t1HjgC0rrA3UakfuHDsRtWs2jKeH\nx1W5OfxLzuckKknqa8RfEA/WlBDSuWN9t6Cdhg6se1QV6KpAxKI9xUihORer\nqa4A8KHdCfSg+uPLvdiYBGXAzzBCdzfoZ82A0loDgS5ugSk4OThS8poMgGNy\nPVrlcE+01aJKUYST9i21Nr4oJFwxMWSpgcgCmwuyl5X7Anx3nDsa8zeDJGRX\ndBSd8DvNACYeY/wwfMMQGhqh54Yt4dvPV3uUVgek4WLPxYgKur22BEKIcGOo\nohNx6/ykEZMHPaE4utk/RiKJvO5YdzfVzo/8FgfXT3p3ggCo5f0+jCpXhPwU\nSo9I/SH4pR1pVjwi4cu+tva7ex9IsMXcO+HKANJGLmqZ3kWyU0cu14PUmo1A\nKkJTbWv5U0vmYfkyRqyaRRsIdFjOa2scefDDFymtdIWFXalOB4ByoDQR0sWE\naLS+\r\n=Ensd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBEiygIuk0R65oDw0V+87q3kkiM+2QpS+4dlHA4uCk4AIhAOXBToC8nx467R+JtbqhX/z/96Uux39VYpaCkcOKhLvF"}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"_npmUser":{"name":"donavon","email":"github@donavon.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.5.0_1548001794700_0.6338934546417883"},"_hasShrinkwrap":false},"1.6.0":{"name":"react-hooks-helper","version":"1.6.0","description":"A custom React Hooks library that gives you custom hooks for your code.","main":"dist/react-hooks-helper.js","umd:main":"dist/react-hooks-helper.umd.js","module":"dist/react-hooks-helper.m.js","source":"src/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"scripts":{"prepublishOnly":"npm run build","lint":"eslint src","test":"jest --verbose --coverage --silent","test:watch":"jest --watch --runInBand --silent","prebuild":"npm run lint && npm t && rimraf dist","build":"microbundle -o dist/ --sourcemap false --target web","dev":"microbundle watch -o dist/ --sourcemap false --compress false"},"keywords":["react-hooks","hooks","react","utils","lib","form","step","wizard"],"author":{"name":"revelcw"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.3","@babel/preset-react":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","eslint":"^5.10.0","eslint-config-amex":"^9.0.0","jest":"^23.6.0","jest-dom":"^3.0.0","microbundle":"^0.9.0","react":"^16.8.0","react-dom":"^16.8.0","react-testing-library":"^5.5.3","rimraf":"^2.6.2"},"peerDependencies":{"react":"^16.8.0"},"gitHead":"e5bf42fcfdc601515781137fd754b7cf11acf12e","bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","_id":"react-hooks-helper@1.6.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-DlyWQ99tgwyDdJfTihCXT6AftYymxhA2LS60vBCTOpclmjPxqDwDTLjVK0kbIc3XsgJvxkanW8TwHE0jrIB8hA==","shasum":"d4105f8745471600b38dc450260d513553c883b1","tarball":"https://registry.npmjs.org/react-hooks-helper/-/react-hooks-helper-1.6.0.tgz","fileCount":7,"unpackedSize":20616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWzAVCRA9TVsSAnZWagAAU20P/0kTD/E7o3qfcPb6ppB/\n8BFflMb/ywQYE03+nnqXe0CHopsrrHXtYAkxIgMvQTQPyDYGrvXhDFbYdH5H\nH6x3sBT/5K9PGYRCgccO942kuyUZD0OiWTqWiw+QJhl9GJBJS5NEifz+uqZW\npIPXtNnRxfCErYX54uDp8ebdMuV+NXz9sCcFnScuwJBXdmnhF6obA6lZf/6e\nDvMcUsbGYXVeFZ7zjtvKhEoNMZc3wJAgfpPO15WJCMF9feM8OaPX2oDr0AzD\npBH9WTzbTPh01Tf+Mfi6EKfpfDjpacSe+ywKr8/gHiuqSJUMPnh/PpkCsEEk\n6iM5lVzN+YPSNRO6XQkEBSsdnEsCkC1TEx1tu5TnvD40fEp+dqvSl306W97c\nwjaUadYZQrus95KlFf3ddrM0UhfWrGhwiBQoWHbEWtMr4qNw5PNsDOkt8kUF\nMlI4Hzfm02GVcZNbwl/AYxTaZwlPIgpIn+al2sagFH8X8I2dU+9aqBRdbvf3\nwCpmEDNW8Vwtr+i6CofVBOXgOaowvWl8GjpNFpdOHbuZBqs/aCCQSgOyelAN\nqtJ1RcgJBk+qv5JcL/bsdARyivmb3A6U8T/fM8QPO5mT/7tqvPmJxdyAA7Kb\nOSqP9ATEQU39wLYMW4aF4Abyk2hNg6spJADqDfioCF+uh7TJkKrRkgK7oUYI\nUVeT\r\n=H+lg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID6aCBGFRlj/J++FdfW7szbVKGlW+pyXXiGTeYmrKdPdAiEAz24lPaORyiF2owuEHZFzwcbEVko/uRSKM8P6QOwNnhw="}]},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"_npmUser":{"name":"donavon","email":"github@donavon.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks-helper_1.6.0_1549479956325_0.7937305735785787"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-15T15:23:54.241Z","0.0.0":"2018-12-15T15:23:54.404Z","modified":"2022-05-14T12:14:41.267Z","0.0.1":"2018-12-21T20:59:16.062Z","0.0.2":"2018-12-28T23:27:41.136Z","0.0.3":"2018-12-28T23:45:28.789Z","0.0.4":"2018-12-28T23:56:55.853Z","0.1.0":"2018-12-29T14:00:04.429Z","0.1.1":"2018-12-29T15:50:20.218Z","1.0.0":"2018-12-29T15:53:14.215Z","1.0.1":"2018-12-29T19:30:29.093Z","1.1.0":"2018-12-29T23:33:29.932Z","1.1.1":"2018-12-30T17:27:42.558Z","1.1.2":"2018-12-30T17:34:01.740Z","1.1.4":"2019-01-01T20:12:33.120Z","1.2.0":"2019-01-01T21:28:55.584Z","1.2.1":"2019-01-01T21:31:44.274Z","1.3.0-alpha.0":"2019-01-02T23:50:29.647Z","1.3.0-alpha.1":"2019-01-03T13:04:57.901Z","1.3.0-alpha.2":"2019-01-03T18:51:14.677Z","1.3.0-alpha.3":"2019-01-03T22:52:44.963Z","1.3.0-alpha.3.1":"2019-01-06T17:08:52.300Z","1.4.0":"2019-01-06T20:44:18.460Z","1.4.1":"2019-01-06T20:58:39.114Z","1.5.0-alpha.0":"2019-01-10T12:01:36.563Z","1.5.0-alpha.1":"2019-01-12T21:18:36.448Z","1.5.0":"2019-01-20T16:29:54.829Z","1.6.0":"2019-02-06T19:05:56.471Z"},"maintainers":[{"name":"revelcw","email":"revelcarlbergwest@gmail.com"}],"license":"MIT","readme":"# react-hooks-helper\n\nA custom [React Hooks](https://reactjs.org/docs/hooks-overview.html) library that gives you custom\nhooks for your code.\n\n[![npm version](https://badge.fury.io/js/react-hooks-helper.svg)](https://badge.fury.io/js/react-hooks-helper)\n\n![react-hooks-helper](https://user-images.githubusercontent.com/29359616/50549517-422f4800-0c2c-11e9-9d5c-380954b0d05e.png)\n\n>🧙‍ `useStep` is a multi-purpose step wizard. Build an image carousel!\n>\n>📋 `useForm` for dead simple form control with nested object support.\n>\n>🚦 `useTrafficLight` easily build a fun traffic light component.\n>\n>‼ `useNot` to simplify toggling `true` / `false` without lambda functions.\n>\n> 🐐 Full 100% test coverage!\n>\n>🔥 Blazing fast!\n\n## Requirement ⚠️\n\nTo use `react-hooks-helper`, you must use `react@16.8.0-alpha.0`. React Hooks is currently at\n**[RFC](https://github.com/reactjs/rfcs/pull/68)** stage.\n\n## Installation\n\n```sh\n$ npm i react-hooks-helper\n```\n\n## Usage\n\n```js\nconst { isPaused, index, step, navigation } = useStep(config);\nconst [{ foo, bar }, setForm] = useForm({ foo, bar });\nconst currentValue = useTrafficLight(initialIndex, durations);\nconst [bar, notBar] = useNot(bool);\n```\n\n## Examples\n\n### useStep\n\nThe new `useStep` Hook is the new `useTrafficLight` and is a more general step wizard.\nYou can use it to simplify many tasks, such as a multi-page input form, or an image carousel.\n\nIt has an auto advance function, or control manually by calling `previous` and/or `next`.\n\n#### Usage\n\n```js\nconst { isPaused, index, step, navigation } = useStep(config);\n```\n\n#### Config\n\nYou pass `useStep` a configuration object containing the following (\\* = required).\n\n| Key                   | Description |\n| :-------------------- | :------------------------------------------------------------------ |\n| `steps`\\*             | Either an array containing the steps to process or an integer specifying the number of steps.  |\n| `initialStep`         | The starting step—either a string id or an index. Default = 0.                      |\n| `autoAdvanceDuration` | If you wish the steps to auto-advance, specify the number of milliseconds. You can also include an `autoAdvanceDuration` in each `step` in your `steps` array, if you wish to have different durations for each step. |\n\n#### Return object\n\n| Key                   | Description                                       |\n| :-------------------- | :------------------------------------------------ |\n| `index`               | A number containing the current step index.       |\n| `step`                | The current `step` object from the `steps` array. |\n| `navigation`          | A `navigation` object (see below).                |\n| `isPaused`            | `true` if the `autoAdvanceDuration` is paused.    |\n| `autoAdvanceDuration` | Duration of the current auto-advance.             |\n\n#### Navigation object\n\nThe `navigation` object returned from `useStep` contains control callback functions as follows.\n\n| Key        | Description                                                                                            |\n| :--------- | :----------------------------------------------------------------------------------------------------- |\n| `previous` | Call to navigate to the previous item index. Wraps from the first item to the last item.               |\n| `next`     | Call to navigate to the next item index. Wraps from the last item to the first item.                   |\n| `go`       | Call to navigate to a specific step by `id` or by `index`. Example: `go(2)` or `go('billing-address')` |\n| `pause`    | Pause auto-advance navigation.                                                                         |\n| `play`     | Play auto-advance navigation once it has been paused.                                                  |\n\n#### Example\n\nThere's a simple multi-step control with 3 \"pages\".\nYou use the \"Previous\" and \"Next\" buttons to navigate.\n\n```js\nfunction App() {\n  const {\n    index,\n    navigation: { previous, next }\n  } = useStep({ steps: 3 });\n  return (\n    <div>\n      <h1>Hello CodeSandbox</h1>\n\n      {index === 0 && <div>This is step 1</div>}\n      {index === 1 && <div>This is step 2</div>}\n      {index === 2 && <div>This is step 3</div>}\n\n      <div>\n        <button disabled={index === 0} onClick={previous}>Previous</button>\n        <button disabled={index === 2} onClick={next}>Next</button>\n      </div>\n    </div>\n  );\n}\n```\n\n#### Live demo\n\nYou can view/edit a photo carousel on CodeSandbox.\nIt automatically advances after 5 seconds. You can also click previous/next, or\nnavigate directly to a particular image.\n\n[![image](https://user-images.githubusercontent.com/887639/51504518-73281600-1daf-11e9-9509-07ca1145c291.png)](https://codesandbox.io/s/31228l0rnm)\n\n\n[![Edit Carousel using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/31228l0rnm)\n\n### useForm\n\n`useForm` is for an advanced search, sign-up form, etc, something with a lot of text felds, because\nyou only need to use one hook. Wereas on the otherwise you would need many `useState` hooks.\n\n---\n\n#### Before\n\nRight here is some code for a sign-up form. As you can see it is using two `useState` hooks and we\nneed a lambda function to change it.\n\n```jsx\nfunction App() {\n  const [firstName, setFirstName] = useState('');\n  const [lastName, setLastName] = useState('');\n  const [gender, setGender] = useState('Male');\n  const [isAccept, setAcceptToC] = useState(false);\n  return (\n    <div className=\"App\">\n      <input\n        type=\"text\"\n        value={firstName}\n        onChange={ev => {\n          setFirstName(ev.target.value);\n        }}\n      />\n      <div>{firstName}</div>\n      <input\n        type=\"text\"\n        value={lastName}\n        onChange={ev => {\n          setLastName(ev.target.value);\n        }}\n      />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input\n            type=\"radio\"\n            value=\"Female\"\n            checked={gender === 'Female'}\n            onChange={ev => {\n              setGender(ev.target.value);\n            }}\n          />{' '}\n          Female\n        </div>\n        <div className=\"radio\">\n          <input\n            type=\"radio\"\n            value=\"Male\"\n            checked={gender === 'Male'}\n            onChange={ev => {\n              setGender(ev.target.value);\n            }}\n          />{' '}\n          Male\n        </div>\n        <div>Selected Gender: {gender}</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input\n            type=\"checkbox\"\n            value=\"true\"\n            checked={isAccept === 'true'}\n            onChange={ev => {\n              setAcceptToC(ev.target.checked);\n            }}\n          />{' '}\n          I accept and agree Terms &amp; Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [{ firstName, lastName, gender, isAccept }, setValue] = useForm({\n    firstName: '',\n    lastName: '',\n    gender: 'Male',\n    isAccept: false,\n  });\n  return (\n    <div className=\"App\">\n      <input type=\"text\" value={firstName} name=\"firstName\" onChange={setValue} />\n      <div>{firstName}</div>\n      <input type=\"text\" value={lastName} name=\"lastName\" onChange={setValue} />\n      <div>{lastName}</div>\n      <div className=\"radio-group\">\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Female\" checked={gender === 'Female'} onChange={setValue} />{' '}\n          Female\n        </div>\n        <div className=\"radio\">\n          <input type=\"radio\" value=\"Male\" checked={gender === 'Male'} onChange={setValue} /> Male\n        </div>\n        <div>Selected Gender: {gender}</div>\n      </div>\n      <div>\n        <div className=\"checkbox\">\n          <input type=\"checkbox\" value=\"true\" checked={isAccept === 'true'} onChange={setValue} /> I\n          accept and agree Terms &amp; Conditions.\n        </div>\n      </div>\n    </div>\n  );\n}\n```\n\nYou see `useForm` takes the name of your `input` and changes the object, so you only have to create\none `useForm`. You can have as many items in the object, and this allows many inputs, but with still\n**_one_** `useForm`. And it eliminates the use of a lambda function.\n\n#### Nest objects\n\n`useForm` also supports nested objects. This is useful for things like `billing.city` and `shipping.city`.\n\nIn your markup, you simply add the dots in the `name` field like this.\n\n```html\n<input type=\"text\" value={billing.city} name=\"billing.city\" onChange={setValue} />\n```\n\n#### Live demo\n\n[![Edit useEvent (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/m770pm84n8)\n\n### <a id=\"usetrafficlight\"> </a> useTrafficLight\n\n---\n\n#### Before\n\n```jsx\nconst lightDurations = [5000, 4000, 1000];\n\nconst BeforeTrafficLight = ({ initialColor }) => {\n  const [colorIndex, setColorIndex] = useState(initialColor);\n\n  useEffect(\n    () => {\n      const timer = setTimeout(() => {\n        setColorIndex((colorIndex + 1) % 3);\n      }, lightDurations[colorIndex]);\n      return () => clearTimeout(timer);\n    },\n    [colorIndex]\n  );\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### After\n\n```jsx\nconst AfterTrafficLight = ({ initialColor }) => {\n  const colorIndex = useTrafficLight(initialColor, [5000, 4000, 1000]);\n\n  return (\n    <div className=\"traffic-light\">\n      <Light color=\"#f00\" active={colorIndex === 0} />\n      <Light color=\"#ff0\" active={colorIndex === 2} />\n      <Light color=\"#0c0\" active={colorIndex === 1} />\n    </div>\n  );\n};\n```\n\n#### Live demo\n\n[![Edit Traffic light using hooks (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/zqo981j4ym)\n\n### useNot\n\n`useNot` is a toggle function for React components.\n\n---\n\nHere is a simple App that toggles a value to produce either a **blue** or a **red** square.\n\n#### <a id=\"useNotBefore\"></a>Before\n\n```jsx\nfunction App() {\n  const [value, setValue] = useState(false);\n  return (\n    <div\n      onClick={ value => (\n        setValue( !value )\n      )}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue'\n      }}\n    />\n  );\n```\n\n#### After\n\n```jsx\nfunction App() {\n  const [value, notValue] = useNot(false);\n  return (\n    <div\n      onClick={notValue}\n      style={{\n        width: 100,\n        height: 100,\n        backgroundColor: value ? 'red' : 'blue',\n      }}\n    />\n  );\n}\n```\n\n`value`, a boolean, is a variable. `notValue`function that nots the value from `true` to `false` and\nvise versa. Notice the `notValue` is not a lambda function, like in the **[before](#useNotBefore)**\n\n#### Live demo\n\n[![Edit useNot  (rhh demo)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rwk86po7rn)\n\n## My Coding Journey\n\nOn Dec 18, 2017, I did a talk at [ReactNYC](https://www.meetup.com/ReactNYC/) about the\n`useTrafficLight` code above, but it was the \"before\" code and did not use a custom hook, and\n_certainly_ not `react-hooks-helper` because it was not out yet!\n\nHere's my video.\n\n[![YouTube](https://user-images.githubusercontent.com/29359616/50539855-71bf5100-0b55-11e9-8c83-ac4b920fb5ea.png)](https://www.youtube.com/watch?v=mbiryVTIJ4Q&t=3s)\n\n## License\n\n**[MIT](LICENSE)** Licensed\n\n## Code in the wild\n\nHave you built an app (real or sample) using `react-hooks-helper`? Make a PR and add it to the list below.\n\n* [Multi-step form demo](https://codesandbox.io/s/github/donavon/use-step-multi-step-form-demo)\n","readmeFilename":"README.md","description":"A custom React Hooks library that gives you custom hooks for your code.","keywords":["react-hooks","hooks","react","utils","lib","form","step","wizard"],"author":{"name":"revelcw"},"homepage":"https://github.com/revelcw/react-hooks-helper#readme","repository":{"type":"git","url":"git+https://github.com/revelcw/react-hooks-helper.git"},"bugs":{"url":"https://github.com/revelcw/react-hooks-helper/issues"}}