{"id":24385615,"url":"https://github.com/jmlavoier/react-use-clickout","last_synced_at":"2026-04-19T20:39:22.137Z","repository":{"id":38483680,"uuid":"222543182","full_name":"jmlavoier/react-use-clickout","owner":"jmlavoier","description":"It's a custom hook that handles an event after clicking outside of the component","archived":false,"fork":false,"pushed_at":"2023-03-04T15:02:07.000Z","size":204,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T09:35:07.941Z","etag":null,"topics":["clickout","clickoutside","custom-hook","hacktoberfest","react","react-hooks"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmlavoier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-18T20:57:31.000Z","updated_at":"2023-01-12T13:50:14.000Z","dependencies_parsed_at":"2025-01-19T11:32:25.702Z","dependency_job_id":null,"html_url":"https://github.com/jmlavoier/react-use-clickout","commit_stats":{"total_commits":51,"total_committers":3,"mean_commits":17.0,"dds":0.3529411764705882,"last_synced_commit":"3b87f14e82e15537d8b537e1dfb66f75ddba453c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmlavoier/react-use-clickout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmlavoier%2Freact-use-clickout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmlavoier%2Freact-use-clickout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmlavoier%2Freact-use-clickout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmlavoier%2Freact-use-clickout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmlavoier","download_url":"https://codeload.github.com/jmlavoier/react-use-clickout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmlavoier%2Freact-use-clickout/sbom","scorecard":{"id":524552,"data":{"date":"2025-08-11","repo":{"name":"github.com/jmlavoier/react-use-clickout","commit":"3b87f14e82e15537d8b537e1dfb66f75ddba453c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 15 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T04:00:23.706Z","repository_id":38483680,"created_at":"2025-08-20T04:00:23.707Z","updated_at":"2025-08-20T04:00:23.707Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32022557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clickout","clickoutside","custom-hook","hacktoberfest","react","react-hooks"],"created_at":"2025-01-19T11:19:39.911Z","updated_at":"2026-04-19T20:39:22.089Z","avatar_url":"https://github.com/jmlavoier.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![icon](icon.png)\n\n# react-use-clickout\n[![Build Status](https://travis-ci.org/jmlavoier/react-use-clickout.svg?branch=master)](https://travis-ci.org/jmlavoier/react-use-clickout)\n[![Coverage Status](https://coveralls.io/repos/github/jmlavoier/react-use-clickout/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/jmlavoier/react-use-clickout?branch=master)\n\nIt's a custom hook that handles an event after clicking out of the component\n\n\u003e This library is deprecated in order to encourage you to use [useClickAway](https://github.com/streamich/react-use/blob/master/docs/useClickAway.md) from [react-use](https://github.com/streamich/react-use) library.\n\n## Get started\nAlright, let's go. First you should install the library\n\n### Installing\nUsing **yarn**\n```\nyarn add react-use-clickout\n```\nOr **npm**\n```\nnpm i react-use-clickout\n```\n\n*Prefer to install it derectly on your project, not globally*\n\n### Using\n\n```js\nimport React from 'react';\nimport useClickout from 'react-use-clickout';\n\n\nfunction App() {\n  const [\n    ref, // it's to be assigned to the component reference\n    bindHandler // it's a function to bind a callback handler\n  ] = useClickout();\n  \n  /**\n   * The function passed as a callback will be called \n   * if clicked out of the referenced component \n   */\n  bindHandler(() =\u003e {\n    console.log('clickout');\n  });\n\n  return (\n    \u003cdiv\u003e\n      \u003cp ref={ref}\u003e\n        Referenced component \n      \u003c/p\u003e\n      \u003cdiv\u003e\n        It's out of the referenced component\n      \u003c/div\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\nChanging **Events** is possible. You can pass an array with the events to be listened. The default are `mousedown` and `touchstart`.\n\n```js\nconst [ref, bindClickout] = useClickout(['click']);\n```\n\nAlthough the name of this library is *clickout*, it isn't only about click event. \n\n\n### Pre requisites\nIt has the `react@^16.8.0` and `react-dom@^16.8.0` as peer-dependencies\n\n## Contributing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmlavoier%2Freact-use-clickout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmlavoier%2Freact-use-clickout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmlavoier%2Freact-use-clickout/lists"}