{"id":19321862,"url":"https://github.com/pascalallen/react-event-dispatcher","last_synced_at":"2026-05-15T22:32:59.292Z","repository":{"id":65389615,"uuid":"591114729","full_name":"pascalallen/react-event-dispatcher","owner":"pascalallen","description":"Repository for the @pascalallen/react-event-dispatcher NPM package. A lightweight event dispatcher for React.","archived":false,"fork":false,"pushed_at":"2023-03-20T23:03:40.000Z","size":197,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-05T16:08:58.847Z","etag":null,"topics":["dispatcher","events","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pascalallen.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":"2023-01-20T00:17:39.000Z","updated_at":"2023-03-20T23:01:52.000Z","dependencies_parsed_at":"2025-01-06T05:40:48.921Z","dependency_job_id":"fc282da2-64e3-4c2a-aee1-a5ddfa88653c","html_url":"https://github.com/pascalallen/react-event-dispatcher","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pascalallen/react-event-dispatcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalallen%2Freact-event-dispatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalallen%2Freact-event-dispatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalallen%2Freact-event-dispatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalallen%2Freact-event-dispatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pascalallen","download_url":"https://codeload.github.com/pascalallen/react-event-dispatcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalallen%2Freact-event-dispatcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33082021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["dispatcher","events","react","typescript"],"created_at":"2024-11-10T01:39:21.066Z","updated_at":"2026-05-15T22:32:59.269Z","avatar_url":"https://github.com/pascalallen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Event Dispatcher\n\nA lightweight event dispatcher for React.\n\n## Installation\n\nUse the package manager [yarn](https://classic.yarnpkg.com/lang/en/docs/install) to install @pascalallen/react-event-dispatcher.\n\n```bash\nyarn add @pascalallen/react-event-dispatcher\n```\n\n## Usage\n\n### Dispatch\n\n```typescript\nimport { DomainEvent, eventDispatcher } from '@pascalallen/react-event-dispatcher';\n\nconst event: DomainEvent = {\n  name: 'USER_ADDED',\n  data: {\n    id: '01GQ7S8624BN2Q2S3HNZH5SGDJ'\n  }\n};\n\neventDispatcher.dispatch(event);\n```\n\n### Subscribe\n\n```typescript\nimport { useEffect } from \"react\";\nimport { DomainEvent, useEvent } from '@pascalallen/react-event-dispatcher';\n\nconst userAddedEvent: DomainEvent | undefined = useEvent('USER_ADDED');\n\nuseEffect(() =\u003e {\n  userAddedEvent?.id \u0026\u0026 console.log('User added');\n}, [userAddedEvent]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalallen%2Freact-event-dispatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpascalallen%2Freact-event-dispatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalallen%2Freact-event-dispatcher/lists"}