{"id":15397003,"url":"https://github.com/ryanhefner/use-dependency-alert","last_synced_at":"2026-04-16T00:31:43.143Z","repository":{"id":61365710,"uuid":"545807747","full_name":"ryanhefner/use-dependency-alert","owner":"ryanhefner","description":"🚨 React hook for debugging hook dependency arrays to validate what is changing, and how often.","archived":false,"fork":false,"pushed_at":"2022-10-15T01:22:28.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T02:01:53.979Z","etag":null,"topics":["debugging","react","react-hooks"],"latest_commit_sha":null,"homepage":"https://www.pkgstats.com/pkg:use-dependency-alert","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/ryanhefner.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}},"created_at":"2022-10-05T02:25:22.000Z","updated_at":"2023-03-04T04:12:37.000Z","dependencies_parsed_at":"2022-10-15T23:49:57.696Z","dependency_job_id":null,"html_url":"https://github.com/ryanhefner/use-dependency-alert","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":"ryanhefner/package-template-rollup","purl":"pkg:github/ryanhefner/use-dependency-alert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Fuse-dependency-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Fuse-dependency-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Fuse-dependency-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Fuse-dependency-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanhefner","download_url":"https://codeload.github.com/ryanhefner/use-dependency-alert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanhefner%2Fuse-dependency-alert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["debugging","react","react-hooks"],"created_at":"2024-10-01T15:35:44.379Z","updated_at":"2026-04-16T00:31:43.117Z","avatar_url":"https://github.com/ryanhefner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚨 use-dependency-alert\n\n[![npm](https://img.shields.io/npm/v/use-dependency-alert?style=flat-square)](https://www.pkgstats.com/pkg:use-dependency-alert)\n[![NPM](https://img.shields.io/npm/l/use-dependency-alert?style=flat-square)](LICENSE)\n[![npm](https://img.shields.io/npm/dt/use-dependency-alert?style=flat-square)](https://www.pkgstats.com/pkg:use-dependency-alert)\n[![Coveralls github](https://img.shields.io/coveralls/github/ryanhefner/use-dependency-alert?style=flat-square)](https://coveralls.io/github/ryanhefner/use-dependency-alert)\n[![codecov](https://codecov.io/gh/ryanhefner/use-dependency-alert/branch/main/graph/badge.svg)](https://codecov.io/gh/ryanhefner/use-dependency-alert)\n[![CircleCI](https://img.shields.io/circleci/build/github/ryanhefner/use-dependency-alert?style=flat-square)](https://circleci.com/gh/ryanhefner/use-dependency-alert)\n![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/ryanhefner/use-dependency-alert?style=flat-square)\n\nReact hook for debugging hook dependency arrays to validate what is changing, and how often. Not intended to be included in the final `production` build, but handy to use while debugging and confirming hooks are being triggered/rerendered when expected.\n\n## Install\n\nVia [npm](https://npmjs.com/package/use-dependency-alert)\n\n```sh\nnpm install use-dependency-alert\n```\n\nVia [Yarn](https://yarn.pm/use-dependency-alert)\n\n```sh\nyarn add use-dependency-alert\n```\n\n## How to use\n\n```js\nimport { useEffect } from 'react'\nimport useDepedencyAlert from 'use-dependency-alert'\n\nconst TestComponent = ({ changingProp }) =\u003e {\n  useEffect(() =\u003e {\n    // This should not be changing often, but useDependencyAlert will let us know if that’s the case\n  }, useDependencyAlert([changingProp]))\n\n  return \u003cdiv\u003e{changingProp}\u003c/div\u003e\n}\n```\n\n### With Options\n\n```js\nimport { useEffect } from 'react'\nimport useDepedencyAlert from 'use-dependency-alert'\n\nconst TestComponent = ({ changingProp }) =\u003e {\n  useEffect(() =\u003e {\n    // This should not be changing often, but useDependencyAlert will let us know if that’s the case\n  }, useDependencyAlert(\n    [changingProp],\n    {\n      context: 'TestComponent',\n      dependencyKeys: ['changingProps'],\n      logDelay: 5000,\n    },\n  ))\n\n  return \u003cdiv\u003e{changingProp}\u003c/div\u003e\n}\n```\n\n#### Options\n\n* `context: string` - Basic string for making alerts unique to help differentiate from others.\n* `dependencyKeys: string[]` - Array of names to apply to depedency indexes in the array. Intended to streamline debugging.\n* `logDelay: number` - Milliseconds used to delay the logging of depedency updates to help keep the noise down in the `console`.\n\n## License\n\n[MIT](LICENSE) © [Ryan Hefner](https://www.ryanhefner.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanhefner%2Fuse-dependency-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanhefner%2Fuse-dependency-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanhefner%2Fuse-dependency-alert/lists"}