{"id":23972498,"url":"https://github.com/olavoparno/react-use-rapid7","last_synced_at":"2026-05-10T05:02:17.693Z","repository":{"id":63980040,"uuid":"571373234","full_name":"olavoparno/react-use-rapid7","owner":"olavoparno","description":"Adds Rapid7 InsightOps hooks to React to keep track of your application","archived":false,"fork":false,"pushed_at":"2022-11-29T18:10:04.000Z","size":417,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T02:46:48.892Z","etag":null,"topics":["insightops","logging","monitoring","rapid7","react","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/olavoparno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-28T01:17:24.000Z","updated_at":"2023-04-08T18:23:53.000Z","dependencies_parsed_at":"2023-01-14T17:15:28.214Z","dependency_job_id":null,"html_url":"https://github.com/olavoparno/react-use-rapid7","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/olavoparno/react-use-rapid7","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olavoparno%2Freact-use-rapid7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olavoparno%2Freact-use-rapid7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olavoparno%2Freact-use-rapid7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olavoparno%2Freact-use-rapid7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olavoparno","download_url":"https://codeload.github.com/olavoparno/react-use-rapid7/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olavoparno%2Freact-use-rapid7/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271330292,"owners_count":24740815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"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":["insightops","logging","monitoring","rapid7","react","typescript"],"created_at":"2025-01-07T03:30:02.719Z","updated_at":"2026-05-10T05:02:12.660Z","avatar_url":"https://github.com/olavoparno.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" alt=\"traffic\" src=\"https://pv-badge.herokuapp.com/total.svg?repo_id=olavoparno-react-use-rapid7\"/\u003e\n\n# react-use-rapid7\n\n\u003e Adds Rapid7 InsightOps hooks to React\n\n[![NPM](https://img.shields.io/npm/v/react-use-rapid7.svg)](https://www.npmjs.com/package/react-use-rapid7)\n\n---\n\n| Statements                                                                               | Branches                                                                             | Functions                                                                              | Lines                                                                          |\n| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |\n| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) |\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Documentation](#documentation)\n- [Contributors](#contributors)\n- [License](#license)\n\n---\n\n## Install\n\n```bash\nnpm install --save react-use-rapid7\n```\n\n---\n\n## Usage\n\n- You can just call for useRapid7 hook and expect the following parameters:\n\n| key                      | description        | example                               |\n| ------------------------ | ------------------ | ------------------------------------- |\n| token                    | Rapid7's API key   | 29189s8asa-skajskj1298sas-kjsaksjak92 |\n| rapid7's optional config | Other extra config | { print: true }                       |\n\n---\n\n## Examples\n\n```tsx\nconst logger = useRapid7('sas1209-cdbb-4afc-b10f-2198sasak', {\n  print: true,\n});\n\naSimplePromise()\n  .then(() =\u003e logger.info('aSimplePromise has been resolved'))\n  .catch((error) =\u003e\n    logger.error(`aSimplePromise has errored with ${error.message}`)\n  );\n```\n\n---\n\n## Documentation\n\n`useRapid7()` returns a logger with the following methods:\n\n```tsx\ntype MessageHandler = (\n  message: string | Record\u003cstring \u0026 number \u0026 symbol, string\u003e | Error\n) =\u003e void;\n\ntype LoggersClientReturn = {\n  warn: MessageHandler;\n  error: MessageHandler;\n  info: MessageHandler;\n  log: MessageHandler;\n};\n```\n\nYou can use a simple string or an object for the message.\n\n---\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://olavoparno.github.io\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/7513162?v=4?s=70\" width=\"70px;\" alt=\"Olavo Parno\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eOlavo Parno\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-olavoparno\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/olavoparno/react-use-rapid7/commits?author=olavoparno\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/olavoparno/react-use-rapid7/commits?author=olavoparno\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n---\n\n## License\n\nreact-use-rapid7 is [MIT licensed](./LICENSE).\n\n---\n\nThis hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folavoparno%2Freact-use-rapid7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folavoparno%2Freact-use-rapid7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folavoparno%2Freact-use-rapid7/lists"}