{"_id":"@bro95-hooks/use-before-leave","name":"@bro95-hooks/use-before-leave","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bro95-hooks/use-before-leave","version":"1.0.0","description":"React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/kimbro95/React-Hooks.git#main"},"keywords":["react","hooks","leave","beforeleave","unload","mouseleave"],"author":{"name":"kimbro95"},"license":"MIT","bugs":{"url":"https://github.com/kimbro95/React-Hooks/tree/main/hooks/useBeforeLeave/issues"},"homepage":"https://github.com/kimbro95/React-Hooks/tree/main/hooks/useBeforeLeave#readme","peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"gitHead":"8a73c195a15a76bd0cafcc855f4b4c92c7d5279f","_id":"@bro95-hooks/use-before-leave@1.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-nfiAElFtFl4QfdZBf0w8CD0MINIEexkZIRukAiv6d8Y23S/72YF0609vnnd3v+Nq0abLdOVXJYJImURuseRnuw==","shasum":"0a517f63a370182ca26e5b4dce76097cbb003092","tarball":"https://registry.npmjs.org/@bro95-hooks/use-before-leave/-/use-before-leave-1.0.0.tgz","fileCount":4,"unpackedSize":2114,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB42IqnWmlsWQ0UGDRbY4LeXNydK4XMQ7WE4u0Iub4QvAiBqlfZW5Cwwc8/EbhXSkgkgF1uuWmCeI5xdKla1zjlexw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqrMRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofKg//Rgf+p4XqZUB44g8wmGdSRQJ6ClDzxcKfLxpf9O1ead1pZ6to\r\nGr95zW75Zi9hN+ucJ9GBA46R24D+VeDa4hTyndupXRevH0KE+IoBrPx+EPlR\r\nNk3EgUjePnAFg4hKmgOKL4oqTB1BCisRI3V6muEv2xktjp2UAof6doyFMOii\r\nQiwtHNRRxAezoOdUhdla6FYRYIu3cfYMb6noe9qQSlVJdC6ZBHOI7MhGIHUp\r\nG/CeOhatNHrNR3yI6d4n7ThHcKoe+fAWtGhW3t6fKVnSTdjAaQeGqv+ZT2ce\r\nse9LtjUd5dVVXgTaINmvmf+Txk6N66rssAL8MZPw5Qvq6+kVpFUQXHLey1V9\r\nvMq1v0IE0bDHEwdb49Dlwwxr0Hd/ypJCu3MYQJnlbIK7N/GCnsSlPpfOgnYo\r\noLqUSbScR0ZpXXGHVtQUiRk3WI5CsCSN5C+bv0XmOzW7BDpJLhxaZNT6mesu\r\n/xkfDNEXFV1qNo1WwYsP8QbXRgVLWb1MPfvu/CIvnoX7GgXk96nWLLMloNWU\r\nKRrIdUjGNAEcBBlpAMhFB2uts6LVAXHOVVD6t2PmcVq/Vczh3LuyF3rxaOhS\r\nUja8Qx/QE1vhcy9AZuy4iz++IgzeIBP8yfjE06d4be1crO44KjXieUB7rUPk\r\nBmyYEt0UYF17gC5pnkoWSG34UCdbd8737jk=\r\n=1rl0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kimbro95","email":"gudgudgud714@naver.com"},"directories":{},"maintainers":[{"name":"kimbro95","email":"gudgudgud714@naver.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-before-leave_1.0.0_1655354128861_0.6463910010459786"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-16T04:35:28.794Z","1.0.0":"2022-06-16T04:35:29.007Z","modified":"2022-06-16T04:35:29.164Z"},"maintainers":[{"name":"kimbro95","email":"gudgudgud714@naver.com"}],"description":"React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics.","homepage":"https://github.com/kimbro95/React-Hooks/tree/main/hooks/useBeforeLeave#readme","keywords":["react","hooks","leave","beforeleave","unload","mouseleave"],"repository":{"type":"git","url":"git+https://github.com/kimbro95/React-Hooks.git#main"},"author":{"name":"kimbro95"},"bugs":{"url":"https://github.com/kimbro95/React-Hooks/tree/main/hooks/useBeforeLeave/issues"},"license":"MIT","readme":"# @bro95-hooks/use-before-leave\r\n\r\n📌React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics.\r\n\r\n## Installation\r\n\r\n#### npm\r\n\r\n`npm i @bro95-hooks/use-before-leave`\r\n\r\n## Usage\r\n\r\n```js\r\nimport React from \"react\";\r\nimport useBeforeLeave from \"@bro95-hooks/use-before-leave\";\r\n\r\nfunction App() {\r\n  const beforeLeave = () => console.log(\"User is leaving...\");\r\n  useBeforeLeave(beforeLeave);\r\n  return <h1>Hello Nooks</h1>;\r\n}\r\n```\r\n\r\n### Arguments\r\n\r\n| Argument      | Type     | Description                                              | Required |\r\n| ------------- | -------- | -------------------------------------------------------- | -------- |\r\n| onBeforeLeave | function | Function to be called when the mouse leaves the document | yes      |","readmeFilename":"README.md"}