{"id":24054099,"url":"https://github.com/acandylevey/ngrx-http-tracking","last_synced_at":"2026-01-18T00:24:13.379Z","repository":{"id":44731250,"uuid":"390712741","full_name":"acandylevey/ngrx-http-tracking","owner":"acandylevey","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-29T00:00:51.000Z","size":1440,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-20T18:40:02.516Z","etag":null,"topics":["angular","ngrx","typescript"],"latest_commit_sha":null,"homepage":"https://acandylevey.github.io/ngrx-http-tracking/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acandylevey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["acandylevey"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-07-29T12:13:18.000Z","updated_at":"2025-09-29T00:00:34.000Z","dependencies_parsed_at":"2024-01-02T02:10:14.439Z","dependency_job_id":"c639998b-db5c-4817-8c31-de8d709bd7a3","html_url":"https://github.com/acandylevey/ngrx-http-tracking","commit_stats":{"total_commits":28,"total_committers":4,"mean_commits":7.0,"dds":0.1785714285714286,"last_synced_commit":"66725dde7f96c8dc79212ea7e165afaa150f130c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/acandylevey/ngrx-http-tracking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acandylevey%2Fngrx-http-tracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acandylevey%2Fngrx-http-tracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acandylevey%2Fngrx-http-tracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acandylevey%2Fngrx-http-tracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acandylevey","download_url":"https://codeload.github.com/acandylevey/ngrx-http-tracking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acandylevey%2Fngrx-http-tracking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28523713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T23:53:28.710Z","status":"ssl_error","status_checked_at":"2026-01-17T23:52:20.131Z","response_time":85,"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":["angular","ngrx","typescript"],"created_at":"2025-01-09T03:01:29.525Z","updated_at":"2026-01-18T00:24:13.374Z","avatar_url":"https://github.com/acandylevey.png","language":"TypeScript","funding_links":["https://github.com/sponsors/acandylevey"],"categories":["State Management"],"sub_categories":["NgRx"],"readme":"# NgRx Http Tracking\n\n[![Npm Published](https://github.com/acandylevey/ngrx-http-tracking/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/acandylevey/ngrx-http-tracking/actions/workflows/npm-publish.yml)\n\n[Checkout the demo](https://acandylevey.github.io/ngrx-http-tracking/)\n\nThis NgRx library is aims to slot into your pre-existing NgRx stores to reduce the amount of boiler plate code you need to write and to make handling the loading, success and error states of HTTP Requests significantly easier.\n\nCompatibility\n\n```\nAngular 16+\n```\n\nInstalling\n\n```\nnpm i @acandylevey/ngrx-http-tracking\n```\n\nImporting the module\n\n```\n...\nimport { NgrxHttpTrackingModule } from '@acandylevey/ngrx-http-tracking';\n\n imports: [\n    ...\n    NgrxHttpTrackingModule,\n ]\n\n```\n\nCreating a http-tracked action\n\n```\nexport const fetchUsers = createTrackingActions\u003cUserRequest, User[]\u003e(\n  'Users',\n  'fetchUsers'\n);\n```\n\nCreating your effect\n\n```\nimport { UserApiService } from './user-api.service';\nimport * as UserActions from './user.actions';\n...\nfetchUsers$ = createTrackingEffect(\n    this.actions$,\n    UserActions.fetchUsers,\n    this.userApi.fetchUsers,\n    'Could not load users'\n  );\n```\n\nYour reducer doesn't change much, except you no longer need to worry about keeping track of the load state\n\n```\nconst usersReducer = createReducer(\n  initialState,\n  on(UserActions.fetchUsers.loaded, (state, { payload }) =\u003e\n    userssAdapter.setAll(payload, { ...state })\n  )\n);\n```\n\nTracking the results\n\nBy default, all actions are tagged with a global tag that can then be easily intercepted a global level, to provide global error handling or a global loading spinner if any actions are waiting on http requests.\n\n```\n isLoaded$ = this.httpTracker.isLoaded(UserActions.fetchUsers);\n isLoading$ = this.httpTracker.isLoading(UserActions.fetchUsers);\n\n isGloballyLoading$ = this.httpTrackingFacade.getGlobalLoading();\n globalErrors$ = this.httpTrackingFacade.getGlobalErrors();\n```\n\nYou can also apply your own tags to a set of actions and then get summarised results back\n\n```\nexport const fetchUsers = createTrackingActions\u003cUserRequest, User[]\u003e(\n  'Users',\n  'fetchUsers',\n  true, // has global tag still\n  ['user-profiles']\n);\n\nisTagLoading$ = this.httpTracker.isTagLoading('user-profiles');\n```\n\nThere is also a provided way of simple continuing a peice of logic once a http request as resolved (Either success or failure)\n\nFiring the reuqest from a facade\n\n```\n fetchUsers() {\n    this.store.dispatch(UserActions.fetchUsers.loading());\n    return UserActions.fetchUsers;\n  }\n```\n\nTracking it\n\n```\nthis.httpTrackingFacade\n      .getResolved(this.userFacade.fetchUsers())\n      .subscribe((result) =\u003e {\n        console.log(`The result from the fetch users call was: {result}`);\n      });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facandylevey%2Fngrx-http-tracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facandylevey%2Fngrx-http-tracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facandylevey%2Fngrx-http-tracking/lists"}